Change in vdsm[master]: gluster: get rdma port number as part of volume status.
by dnarayan@redhat.com
Darshan N has uploaded a new change for review.
Change subject: gluster: get rdma port number as part of volume status.
......................................................................
gluster: get rdma port number as part of volume status.
In glusterfs volume status command is modified to
retrive rdma port number along with tcp port. This
patch adds parsing of the newly added rdma port
number. The modified gluster volume status verb
returns the rdma port as follows.
{'name': NAME,
'bricks': [{'brick': BRICK,
'hostuuid': UUID,
'port': PORT,
'ports': {'tcp': TCP_PORT , 'rdma': RDMA_PORT} #newly added
'status': STATUS,
'pid': PID}, ...],
'nfs': [{'hostname': HOST,
'hostuuid': UUID,
'port': PORT,
'ports': {'tcp': TCP_PORT , 'rdma': RDMA_PORT} #newly added
'status': STATUS,
'pid': PID}, ...],
'shd: [{'hostname': HOST,
'hostuuid': UUID,
'status': STATUS,
'pid': PID}, ...]}
Change-Id: I5f31c3fc194f0113fdd707f59576835a4a9f2832
Signed-off-by: darshan n <dnarayan(a)redhat.com>
---
M tests/gluster_cli_tests.py
M vdsm/gluster/cli.py
2 files changed, 29 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/36607/1
diff --git a/tests/gluster_cli_tests.py b/tests/gluster_cli_tests.py
index 0410f8d..221b25b 100644
--- a/tests/gluster_cli_tests.py
+++ b/tests/gluster_cli_tests.py
@@ -232,6 +232,10 @@
<path>/tmp/music-b1</path>
<peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>49152</port>
+ <ports>
+ <tcp>49152</tcp>
+ <rdma>N/A</rdma>
+ </ports>
<status>1</status>
<pid>1313</pid>
</node>
@@ -240,6 +244,10 @@
<path>/tmp/music-b2</path>
<peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>49153</port>
+ <ports>
+ <tcp>49153</tcp>
+ <rdma>N/A</rdma>
+ </ports>
<status>1</status>
<pid>1335</pid>
</node>
@@ -248,6 +256,10 @@
<path>192.168.122.2</path>
<peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>38467</port>
+ <ports>
+ <tcp>38467</tcp>
+ <rdma>N/A</rdma>
+ </ports>
<status>1</status>
<pid>1357</pid>
</node>
@@ -256,6 +268,10 @@
<path>192.168.122.2</path>
<peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>0</port>
+ <ports>
+ <tcp>0</tcp>
+ <rdma>N/A</rdma>
+ </ports>
<status>1</status>
<pid>1375</pid>
</node>
@@ -272,12 +288,16 @@
'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'pid': '1313',
'port': '49152',
+ 'ports': {'rdma': 'N/A',
+ 'tcp': '49152'},
'status': 'ONLINE'},
{'brick': '192.168.122.2:/tmp/music-b2',
'hostuuid':
'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'pid': '1335',
'port': '49153',
+ 'ports': {'rdma': 'N/A',
+ 'tcp': '49153'},
'status': 'ONLINE'}],
'name': 'music',
'nfs': [{'hostname': '192.168.122.2',
@@ -285,6 +305,7 @@
'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'pid': '1357',
'port': '38467',
+ 'ports': {'rdma': 'N/A', 'tcp': '38467'},
'status': 'ONLINE'}],
'shd': [{'hostname': '192.168.122.2',
'hostuuid':
diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index 2e1c9a9..4708c46 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -141,6 +141,10 @@
for ch in el.getchildren():
value[ch.tag] = ch.text or ''
+ ports = {}
+ for ch in el.find('ports').getchildren():
+ ports[ch.tag] = ch.text or ''
+
if value['path'] == 'localhost':
value['path'] = hostname
@@ -153,6 +157,7 @@
status['nfs'].append({'hostname': value['path'],
'hostuuid': value['peerid'],
'port': value['port'],
+ 'ports': ports,
'status': value['status'],
'pid': value['pid']})
elif value['hostname'] == 'Self-heal Daemon':
@@ -165,6 +170,7 @@
value['path']),
'hostuuid': value['peerid'],
'port': value['port'],
+ 'ports': ports,
'status': value['status'],
'pid': value['pid']})
return status
@@ -256,11 +262,13 @@
'bricks': [{'brick': BRICK,
'hostuuid': UUID,
'port': PORT,
+ 'ports': {'rdma': RDMA_PORT, 'tcp': TCP_PORT}
'status': STATUS,
'pid': PID}, ...],
'nfs': [{'hostname': HOST,
'hostuuid': UUID,
'port': PORT,
+ 'ports': {'rdma': RDMA_PORT, 'tcp': TCP_PORT}
'status': STATUS,
'pid': PID}, ...],
'shd: [{'hostname': HOST,
--
To view, visit http://gerrit.ovirt.org/36607
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f31c3fc194f0113fdd707f59576835a4a9f2832
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Darshan N <dnarayan(a)redhat.com>
9 years, 4 months
Change in vdsm[master]: contrib: add useful shell functions to assist in vdsm develo...
by ibarkan@redhat.com
Ido Barkan has posted comments on this change.
Change subject: contrib: add useful shell functions to assist in vdsm development
......................................................................
Patch Set 6: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/36344/6/contrib/shell_helper
File contrib/shell_helper:
Line 175: }
Line 176:
Line 177: vdsm_pep8() {
Line 178: pushd $VDSM_DIR
Line 179: ./autogen.sh --system && ./configure && e pep8
&& make pep8
Line 180: popd
Line 181: }
Line 182:
Line 183: vdsm_unit () {
--
To view, visit http://gerrit.ovirt.org/36344
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide4131db838640a5836fd029696849bced267308
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
9 years, 4 months
Change in vdsm[master]: net stats: add tx/rx statistic to getInterfacesStat
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: net stats: add tx/rx statistic to getInterfacesStat
......................................................................
Patch Set 13:
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit http://gerrit.ovirt.org/35061
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I314a04570dec56677168e0fdb4a7824d299dbd65
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amir Shladovsky <a.shlado(a)gmail.com>
Gerrit-Reviewer: Amador Pahim <apahim(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Lior Vernia <lvernia(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 4 months
Change in vdsm[master]: fileSD: Optimize getAllVolumes on file storage
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: fileSD: Optimize getAllVolumes on file storage
......................................................................
fileSD: Optimize getAllVolumes on file storage
The previous implemantion was using O(N^2) search to detect template
images and volumes. This patch replaces it with O(N) search, improving
the 5000 disks test from 9 seconds to 0.65 seconds.
Change-Id: Idc19ce272b7e0b9c91d2f90aa46b5ddd21d69ece
Bug-Url: https://bugzilla.redhat.com/1177634
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/fileSDTests.py
M vdsm/storage/fileSD.py
2 files changed, 41 insertions(+), 28 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/36593/1
diff --git a/tests/fileSDTests.py b/tests/fileSDTests.py
index 9e0a1a5..0ab0ff1 100644
--- a/tests/fileSDTests.py
+++ b/tests/fileSDTests.py
@@ -123,7 +123,6 @@
self.assertEqual(res["volume-3"], (("image-1",), None))
self.assertEqual(res["volume-4"], (("image-2",), None))
- @brokentest("too slow in current code")
def test_scale(self):
# For this test we want real world strings
images_count = 5000
@@ -153,6 +152,6 @@
elapsed = time.time() - start
print "%f seconds" % elapsed
- # This task should take no time using decent algorithm, using one
- # second to make sure it will not fail on a overloaded test slave.
+ # This takes 0.065 seconds on my laptop, 1 second should be enough even
+ # on overloaded jenkins slave.
self.assertTrue(elapsed < 1.0)
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index 127ec9a..f75c171 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -18,6 +18,7 @@
# Refer to the README and COPYING files for full details of the license
#
+import collections
import os
import errno
import logging
@@ -408,41 +409,54 @@
"""
Return dict {volUUID: ((imgUUIDs,), parentUUID)} of the domain.
- Template self image is the 1st term in template volume entry images.
- The parent can't be determined in file domain without reading the
- metadata.
+ Template self image is the first item in template volume images tuple.
+ The parent uuid is available only for template volumes.
+
Setting parent = None for compatibility with block version.
"""
volMetaPattern = os.path.join(self.mountpoint, self.sdUUID,
sd.DOMAIN_IMAGES, "*", "*.meta")
volMetaPaths = self.oop.glob.glob(volMetaPattern)
- volumes = {}
+
+ # First create mapping from images to volumes
+ images = collections.defaultdict(list)
for metaPath in volMetaPaths:
head, tail = os.path.split(metaPath)
volUUID, volExt = os.path.splitext(tail)
imgUUID = os.path.basename(head)
- if volUUID in volumes:
- # Templates have no parents
- volumes[volUUID]['parent'] = sd.BLANK_UUID
- # Template volumes are hard linked in every image directory
- # which is derived from that template, therefore:
- # 1. a template volume which is in use will appear at least
- # twice (in the template image dir and in the derived image
- # dir)
- # 2. Any volume which appears more than once in the dir tree is
- # by definition a template volume.
- # 3. Any image which has more than 1 volume is not a template
- # image. Therefore if imgUUID appears in more than one path
- # then it is not a template.
- if len(tuple(vPath for vPath in volMetaPaths
- if imgUUID in vPath)) > 1:
- # Add template additonal image
- volumes[volUUID]['imgs'].append(imgUUID)
+ images[imgUUID].append(volUUID)
+
+ # Using images to volumes mapping, we can create volumes to images
+ # mapping, detecting template volumes and template images, based on
+ # these rules:
+ #
+ # Template volumes are hard linked in every image directory
+ # which is derived from that template, therefore:
+ #
+ # 1. A template volume which is in use will appear at least twice
+ # (in the template image dir and in the derived image dir)
+ #
+ # 2. Any volume which appears more than once in the dir tree is
+ # by definition a template volume.
+ #
+ # 3. Any image which has more than 1 volume is not a template
+ # image.
+
+ volumes = {}
+ for imgUUID, volUUIDs in images.iteritems():
+ for volUUID in volUUIDs:
+ if volUUID in volumes:
+ # This must be a template volume (rule 2)
+ volumes[volUUID]['parent'] = sd.BLANK_UUID
+ if len(volUUIDs) > 1:
+ # This image is not a template (rule 3)
+ volumes[volUUID]['imgs'].append(imgUUID)
+ else:
+ # This image is a template (rule 3)
+ volumes[volUUID]['imgs'].insert(0, imgUUID)
else:
- # Insert at head the template self image
- volumes[volUUID]['imgs'].insert(0, imgUUID)
- else:
- volumes[volUUID] = {'imgs': [imgUUID], 'parent': None}
+ volumes[volUUID] = {'imgs': [imgUUID], 'parent': None}
+
return dict((k, sd.ImgsPar(tuple(v['imgs']), v['parent']))
for k, v in volumes.iteritems())
--
To view, visit http://gerrit.ovirt.org/36593
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc19ce272b7e0b9c91d2f90aa46b5ddd21d69ece
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
9 years, 4 months
Change in vdsm[master]: iproute2: Try to remove all dynamic routes even if removal o...
by osvoboda@redhat.com
Ondřej Svoboda has uploaded a new change for review.
Change subject: iproute2: Try to remove all dynamic routes even if removal of one fails
......................................................................
iproute2: Try to remove all dynamic routes even if removal of one fails
When trying to remove a non-existent route (or is its table gone?)
iproute2 fails (retcode=2) with
RTNETLINK answers: No such process
for a reason currently unknown.
In this draft, deal with routes first, i.e. use the same try-except block
as in the caller, DynamicSourceRoute.remove(). But I think even the removal
of individual rules should be wrapped this way, in which case the try-except
block could be removed in the caller.
Change-Id: I6e63d5ceba72be91fdab5ffd9a71ceab398950b9
Signed-off-by: Ondřej Svoboda <osvoboda(a)redhat.com>
---
M vdsm/network/configurators/iproute2.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/52/36652/1
diff --git a/vdsm/network/configurators/iproute2.py b/vdsm/network/configurators/iproute2.py
index ed2dab5..700042c 100644
--- a/vdsm/network/configurators/iproute2.py
+++ b/vdsm/network/configurators/iproute2.py
@@ -213,7 +213,11 @@
@staticmethod
def removeSourceRoute(routes, rules, device):
for route in routes:
- routeDel(route)
+ try:
+ routeDel(route)
+ except IPRoute2Error as e:
+ logging.error('ip binary failed during source route '
+ 'removal: %s', e.message)
for rule in rules:
ruleDel(rule)
--
To view, visit http://gerrit.ovirt.org/36652
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e63d5ceba72be91fdab5ffd9a71ceab398950b9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
9 years, 4 months
Change in vdsm[master]: ip route: parse only first line of route
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: ip route: parse only first line of route
......................................................................
ip route: parse only first line of route
This patch ignores whatever follows the frist backslash in `ip route
show table all`. The motivation is to ignore 'cache' lines, which are of
no interest to Vdsm at the moment.
Change-Id: I5b655ddbbb2fdaa7ec57bc460bc593e40bac977e
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/ipwrapper.py
M tests/ipwrapperTests.py
2 files changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/84/36184/1
diff --git a/lib/vdsm/ipwrapper.py b/lib/vdsm/ipwrapper.py
index 14d3ec9..21dd2c3 100644
--- a/lib/vdsm/ipwrapper.py
+++ b/lib/vdsm/ipwrapper.py
@@ -342,6 +342,10 @@
textual representation.
"""
route = text.split()
+ try:
+ route = route[:route.index('\\')]
+ except ValueError:
+ pass
flags = {}
for flag in ('broadcast', 'unreachable'):
@@ -531,7 +535,7 @@
def routeShowTable(table):
- command = [_IP_BINARY.cmd, 'route', 'show', 'table', table]
+ command = [_IP_BINARY.cmd, '-o', 'route', 'show', 'table', table]
return _execCmd(command)
diff --git a/tests/ipwrapperTests.py b/tests/ipwrapperTests.py
index d7162c9..eea4d20 100644
--- a/tests/ipwrapperTests.py
+++ b/tests/ipwrapperTests.py
@@ -53,6 +53,8 @@
'broadcast 240.0.0.255 dev veth_23 table local '
'proto kernel scope link src 240.0.0.1':
('240.0.0.255', None, 'veth_23', 'local'),
+ 'ff02::2 dev veth_23 metric 0 \ cache':
+ ('ff02::2', None, 'veth_23', None),
}
for text, attributes in good_routes.iteritems():
--
To view, visit http://gerrit.ovirt.org/36184
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b655ddbbb2fdaa7ec57bc460bc593e40bac977e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
9 years, 4 months
Change in vdsm[master]: service: make initctl compatible with systemctl reload rc
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: service: make initctl compatible with systemctl reload rc
......................................................................
service: make initctl compatible with systemctl reload rc
When reloading service with systemctl and the service is inactive
rc is 1.
Same scenario on initctl return rc 0.
We want service reload rc to be consistent on vdsm
and reload is failing when service is down
so we will adapt sysV to systemd.
Change-Id: I878fb898204f7a8a564941b43b12c024ef208765
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M lib/vdsm/tool/service.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/36491/1
diff --git a/lib/vdsm/tool/service.py b/lib/vdsm/tool/service.py
index c7bc864..3c205cc 100644
--- a/lib/vdsm/tool/service.py
+++ b/lib/vdsm/tool/service.py
@@ -225,6 +225,9 @@
def _initctlReload(srvName):
cmd = [_INITCTL.cmd, "reload", srvName]
rc, out, err = execCmd(cmd)
+ status = service_status(srvName, False)
+ if (rc==0) and (status!=0):
+ rc = 1
return (rc, out, err)
@_initctlNative
--
To view, visit http://gerrit.ovirt.org/36491
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I878fb898204f7a8a564941b43b12c024ef208765
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
9 years, 4 months
Change in vdsm[master]: contrib: add useful shell functions to assist in vdsm develo...
by phoracek@redhat.com
Petr Horáček has posted comments on this change.
Change subject: contrib: add useful shell functions to assist in vdsm development
......................................................................
Patch Set 6: Verified+1
Works for me with bash and zsh too
--
To view, visit http://gerrit.ovirt.org/36344
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide4131db838640a5836fd029696849bced267308
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 4 months