Change in vdsm[ovirt-3.4]: gluster: interpret and use correct xml elements
by barumuga@redhat.com
Hello Timothy Asir, Saggi Mizrahi, Aravinda VK, Dan Kenigsberg, Darshan N,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/23650
to review the following change.
Change subject: gluster: interpret and use correct xml elements
......................................................................
gluster: interpret and use correct xml elements
xml output of rebalance and remove-brick status returns filesSkipped
in <skipped> tag and value of <statusStr> tag cleaned up to use it as
proper enum.
Change-Id: I74d91d75950d5cdb61f4056e44474592dd0c9c67
Reviewed-on: http://gerrit.ovirt.org/19674
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
Signed-off-by: Bala.FA <barumuga(a)redhat.com>
---
M vdsm/gluster/cli.py
1 file changed, 8 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/23650/1
diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index e3f7c84..cba2062 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -641,27 +641,31 @@
else:
return
+ st = tree.find('aggregate/statusStr').text
+ statusStr = st.replace(' ', '_').replace('-', '_')
status = {
'summary': {
'runtime': tree.find('aggregate/runtime').text,
'filesScanned': tree.find('aggregate/lookups').text,
'filesMoved': tree.find('aggregate/files').text,
'filesFailed': tree.find('aggregate/failures').text,
- 'filesSkipped': tree.find('aggregate/failures').text,
+ 'filesSkipped': tree.find('aggregate/skipped').text,
'totalSizeMoved': tree.find('aggregate/size').text,
- 'status': tree.find('aggregate/statusStr').text.upper()},
+ 'status': statusStr.upper()},
'hosts': []}
for el in tree.findall('node'):
+ st = el.find('statusStr').text
+ statusStr = st.replace(' ', '_').replace('-', '_')
status['hosts'].append({'name': el.find('nodeName').text,
'id': el.find('id').text,
'runtime': el.find('runtime').text,
'filesScanned': el.find('lookups').text,
'filesMoved': el.find('files').text,
'filesFailed': el.find('failures').text,
- 'filesSkipped': el.find('failures').text,
+ 'filesSkipped': el.find('skipped').text,
'totalSizeMoved': el.find('size').text,
- 'status': el.find('statusStr').text.upper()})
+ 'status': statusStr.upper()})
return status
--
To view, visit http://gerrit.ovirt.org/23650
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I74d91d75950d5cdb61f4056e44474592dd0c9c67
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Aravinda VK <avishwan(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
10 years, 3 months
Change in vdsm[ovirt-3.4]: gluster: add host uuid in volume status
by barumuga@redhat.com
Hello Timothy Asir, Saggi Mizrahi, Aravinda VK, Dan Kenigsberg, Darshan N,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/23651
to review the following change.
Change subject: gluster: add host uuid in volume status
......................................................................
gluster: add host uuid in volume status
This patch adopts newly added host uuid in gluster volume status cli
output
Change-Id: Ia37fdb352cf4e2b22481b3d0c4543fbd22ca7735
Reviewed-on: http://gerrit.ovirt.org/21596
Reviewed-by: Timothy Asir <tjeyasin(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
Signed-off-by: Bala.FA <barumuga(a)redhat.com>
---
M tests/gluster_cli_tests.py
M vdsm/gluster/cli.py
2 files changed, 43 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/51/23651/1
diff --git a/tests/gluster_cli_tests.py b/tests/gluster_cli_tests.py
index 335c35d..b9cf176 100644
--- a/tests/gluster_cli_tests.py
+++ b/tests/gluster_cli_tests.py
@@ -230,6 +230,7 @@
<node>
<hostname>192.168.122.2</hostname>
<path>/tmp/music-b1</path>
+ <peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>49152</port>
<status>1</status>
<pid>1313</pid>
@@ -237,6 +238,7 @@
<node>
<hostname>192.168.122.2</hostname>
<path>/tmp/music-b2</path>
+ <peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>49153</port>
<status>1</status>
<pid>1335</pid>
@@ -244,6 +246,7 @@
<node>
<hostname>NFS Server</hostname>
<path>192.168.122.2</path>
+ <peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>38467</port>
<status>1</status>
<pid>1357</pid>
@@ -251,6 +254,7 @@
<node>
<hostname>Self-heal Daemon</hostname>
<path>192.168.122.2</path>
+ <peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>0</port>
<status>1</status>
<pid>1375</pid>
@@ -264,19 +268,27 @@
status = gcli._parseVolumeStatus(tree)
self.assertEquals(status,
{'bricks': [{'brick': '192.168.122.2:/tmp/music-b1',
+ 'hostuuid':
+ 'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'pid': '1313',
'port': '49152',
'status': 'ONLINE'},
{'brick': '192.168.122.2:/tmp/music-b2',
+ 'hostuuid':
+ 'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'pid': '1335',
'port': '49153',
'status': 'ONLINE'}],
'name': 'music',
'nfs': [{'hostname': '192.168.122.2',
+ 'hostuuid':
+ 'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'pid': '1357',
'port': '38467',
'status': 'ONLINE'}],
'shd': [{'hostname': '192.168.122.2',
+ 'hostuuid':
+ 'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'pid': '1375',
'status': 'ONLINE'}]})
@@ -294,6 +306,7 @@
<node>
<hostname>192.168.122.2</hostname>
<path>/tmp/music-b1</path>
+ <peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>49152</port>
<status>1</status>
<pid>1313</pid>
@@ -307,6 +320,7 @@
<node>
<hostname>192.168.122.2</hostname>
<path>/tmp/music-b2</path>
+ <peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>49153</port>
<status>1</status>
<pid>1335</pid>
@@ -325,6 +339,8 @@
oStatus = \
{'bricks': [{'blockSize': '4096',
'brick': '192.168.122.2:/tmp/music-b1',
+ 'hostuuid':
+ 'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'device': '/dev/vda1',
'fsName': 'ext4',
'mntOptions': 'rw,seclabel,relatime,data=ordered',
@@ -332,6 +348,8 @@
'sizeTotal': '7982.934'},
{'blockSize': '4096',
'brick': '192.168.122.2:/tmp/music-b2',
+ 'hostuuid':
+ 'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'device': '/dev/vda1',
'fsName': 'ext4',
'mntOptions': 'rw,seclabel,relatime,data=ordered',
@@ -355,6 +373,7 @@
<node>
<hostname>192.168.122.2</hostname>
<path>/tmp/music-b1</path>
+ <peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>49152</port>
<status>1</status>
<pid>1313</pid>
@@ -375,6 +394,7 @@
<node>
<hostname>192.168.122.2</hostname>
<path>/tmp/music-b2</path>
+ <peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>49153</port>
<status>1</status>
<pid>1335</pid>
@@ -402,6 +422,8 @@
self.assertEquals(status.keys(), ['bricks', 'name'])
self.assertEquals(status['name'], 'music')
oBricks = [{'brick': '192.168.122.2:/tmp/music-b1',
+ 'hostuuid':
+ 'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'clientsStatus': [{'bytesRead': '1172',
'bytesWrite': '792',
'hostname': '192.168.122.2:1021'},
@@ -409,6 +431,8 @@
'bytesWrite': '12152',
'hostname': '192.168.122.2:1011'}]},
{'brick': '192.168.122.2:/tmp/music-b2',
+ 'hostuuid':
+ 'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'clientsStatus': [{'bytesRead': '1172',
'bytesWrite': '792',
'hostname': '192.168.122.2:1020'},
@@ -431,6 +455,7 @@
<node>
<hostname>192.168.122.2</hostname>
<path>/tmp/music-b1</path>
+ <peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>49152</port>
<status>1</status>
<pid>1452</pid>
@@ -605,6 +630,7 @@
<node>
<hostname>192.168.122.2</hostname>
<path>/tmp/music-b2</path>
+ <peerid>f06b108e-a780-4519-bb22-c3083a1e3f8a</peerid>
<port>49153</port>
<status>1</status>
<pid>1459</pid>
@@ -783,6 +809,8 @@
"""
ostatus = \
{'bricks': [{'brick': '192.168.122.2:/tmp/music-b1',
+ 'hostuuid':
+ 'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'mallinfo': {'arena': '606208',
'fordblks': '132000',
'fsmblks': '64',
@@ -914,6 +942,8 @@
'padddedSizeOf': '172',
'poolMisses': '0'}]},
{'brick': '192.168.122.2:/tmp/music-b2',
+ 'hostuuid':
+ 'f06b108e-a780-4519-bb22-c3083a1e3f8a',
'mallinfo': {'arena': '606208',
'fordblks': '131984',
'fsmblks': '128',
diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index cba2062..afedf11 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -151,16 +151,19 @@
if value['hostname'] == 'NFS Server':
status['nfs'].append({'hostname': value['path'],
+ 'hostuuid': value['peerid'],
'port': value['port'],
'status': value['status'],
'pid': value['pid']})
elif value['hostname'] == 'Self-heal Daemon':
status['shd'].append({'hostname': value['path'],
+ 'hostuuid': value['peerid'],
'status': value['status'],
'pid': value['pid']})
else:
status['bricks'].append({'brick': '%s:%s' % (value['hostname'],
value['path']),
+ 'hostuuid': value['peerid'],
'port': value['port'],
'status': value['status'],
'pid': value['pid']})
@@ -182,6 +185,7 @@
value['sizeFree'] = sizeFree / (1024.0 * 1024.0)
status['bricks'].append({'brick': '%s:%s' % (value['hostname'],
value['path']),
+ 'hostuuid': value['peerid'],
'sizeTotal': '%.3f' % (value['sizeTotal'],),
'sizeFree': '%.3f' % (value['sizeFree'],),
'device': value['device'],
@@ -197,6 +201,7 @@
for el in tree.findall('volStatus/volumes/volume/node'):
hostname = el.find('hostname').text
path = el.find('path').text
+ hostuuid = el.find('peerid').text
clientsStatus = []
for c in el.findall('clientsStatus/client'):
@@ -208,6 +213,7 @@
'bytesWrite': clientValue['bytesWrite']})
status['bricks'].append({'brick': '%s:%s' % (hostname, path),
+ 'hostuuid': hostuuid,
'clientsStatus': clientsStatus})
return status
@@ -218,6 +224,7 @@
for el in tree.findall('volStatus/volumes/volume/node'):
brick = {'brick': '%s:%s' % (el.find('hostname').text,
el.find('path').text),
+ 'hostuuid': el.find('peerid').text,
'mallinfo': {},
'mempool': []}
@@ -247,20 +254,24 @@
When option=None,
{'name': NAME,
'bricks': [{'brick': BRICK,
+ 'hostuuid': UUID,
'port': PORT,
'status': STATUS,
'pid': PID}, ...],
'nfs': [{'hostname': HOST,
+ 'hostuuid': UUID,
'port': PORT,
'status': STATUS,
'pid': PID}, ...],
'shd: [{'hostname': HOST,
+ 'hostuuid': UUID,
'status': STATUS,
'pid': PID}, ...]}
When option='detail',
{'name': NAME,
'bricks': [{'brick': BRICK,
+ 'hostuuid': UUID,
'sizeTotal': SIZE,
'sizeFree': FREESIZE,
'device': DEVICE,
@@ -271,6 +282,7 @@
When option='clients':
{'name': NAME,
'bricks': [{'brick': BRICK,
+ 'hostuuid': UUID,
'clientsStatus': [{'hostname': HOST,
'bytesRead': BYTESREAD,
'bytesWrite': BYTESWRITE}, ...]},
@@ -279,6 +291,7 @@
When option='mem':
{'name': NAME,
'bricks': [{'brick': BRICK,
+ 'hostuuid': UUID,
'mallinfo': {'arena': int,
'fordblks': int,
'fsmblks': int,
--
To view, visit http://gerrit.ovirt.org/23651
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia37fdb352cf4e2b22481b3d0c4543fbd22ca7735
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Aravinda VK <avishwan(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
10 years, 3 months
Change in vdsm[ovirt-3.4]: spec: do not remove vdsm logs when pkg removed
by Douglas Schilling Landgraf
Hello Yaniv Bronhaim, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/24036
to review the following change.
Change subject: spec: do not remove vdsm logs when pkg removed
......................................................................
spec: do not remove vdsm logs when pkg removed
In the commits 4a07386 0b6035a we introduced the concept
of creating of metadata.log, mom.log, supervdsm.log and vdsm.log
logs during the rpm install and sets the proper
user/group. However, now when removing vdsm the logs are removed too
which is not the behaviour as before these commits. This patch will
add ghost macro in the spec to keep logs available when vdsm is removed.
Change-Id: Idc8e62d5a0a6166c9141fe9d6016a525a3331694
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/23876
Reviewed-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 15 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/24036/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 6ff477e..d4ebc43 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -612,12 +612,10 @@
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
-# Creating VDSM logs
+# Creating VDSM logs in this session to avoid rpmbuild
+# complain during the build
install -dDm 0755 %{buildroot}@VDSMLOGDIR@
-touch %{buildroot}@VDSMLOGDIR(a)/metadata.log
-touch %{buildroot}@VDSMLOGDIR(a)/mom.log
-touch %{buildroot}@VDSMLOGDIR(a)/supervdsm.log
-touch %{buildroot}@VDSMLOGDIR(a)/vdsm.log
+touch %{buildroot}@VDSMLOGDIR(a)/{metadata.log,mom.log,supervdsm.log,vdsm.log}
# Install the respawn utility
install -Dm 0755 init/sysvinit/respawn \
@@ -692,6 +690,14 @@
%{_bindir}/vdsm-tool sebool-config || :
# set the vdsm "secret" password for libvirt
%{_bindir}/vdsm-tool set-saslpasswd
+
+# After vdsm install we should create the logs files.
+# In the install session we create it but since we use
+# the ghost macro (in files session) the files are not included
+touch @VDSMLOGDIR(a)/{metadata.log,mom.log,supervdsm.log,vdsm.log}
+chmod 0644 @VDSMLOGDIR(a)/{metadata.log,mom.log,supervdsm.log,vdsm.log}
+chown @VDSMUSER@:@VDSMGROUP@ @VDSMLOGDIR(a)/{metadata.log,mom.log,vdsm.log}
+chown root:root @VDSMLOGDIR(a)/supervdsm.log
# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf.
# So Remove them if it is played with /etc/sysctl.conf.
@@ -883,10 +889,10 @@
%endif
%dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@
-%config %attr(0644, %{vdsm_user}, %{vdsm_group}) @VDSMLOGDIR(a)/metadata.log
-%config %attr(0644, %{vdsm_user}, %{vdsm_group}) @VDSMLOGDIR(a)/mom.log
-%config %attr(0644, root, root) @VDSMLOGDIR(a)/supervdsm.log
-%config %attr(0644, %{vdsm_user}, %{vdsm_group}) @VDSMLOGDIR(a)/vdsm.log
+%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) @VDSMLOGDIR(a)/metadata.log
+%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) @VDSMLOGDIR(a)/mom.log
+%ghost %config %attr(0644, root, root) @VDSMLOGDIR(a)/supervdsm.log
+%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) @VDSMLOGDIR(a)/vdsm.log
%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/hsm-tasks
%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/mnt
%dir %{_libexecdir}/%{vdsm_name}
--
To view, visit http://gerrit.ovirt.org/24036
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc8e62d5a0a6166c9141fe9d6016a525a3331694
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
10 years, 3 months
Change in vdsm[ovirt-3.4]: vdsm.spec: own metadata supervdsm mom logs
by Douglas Schilling Landgraf
Hello Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/23786
to review the following change.
Change subject: vdsm.spec: own metadata supervdsm mom logs
......................................................................
vdsm.spec: own metadata supervdsm mom logs
/var/log/vdsm/metadata.log /var/log/vdsm/supervdsm.log
/var/log/vdsm/mom.log should be owned by VDSM.
Additionaly, now are now creating with touch those files
(and vdsm.log) during the vdsm rpm install.
Change-Id: I2776b8518930393b281a1885268813f8d4d7c85b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1055153
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/23754
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 8 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/86/23786/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 697c571..a5cab66 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -610,9 +610,11 @@
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
-# VDSM Log
+# Creating VDSM logs
install -dDm 0755 %{buildroot}@VDSMLOGDIR@
-# Avoid rpmbuild complain about vdsm.log doesn't exist during the build
+touch %{buildroot}@VDSMLOGDIR(a)/metadata.log
+touch %{buildroot}@VDSMLOGDIR(a)/mom.log
+touch %{buildroot}@VDSMLOGDIR(a)/supervdsm.log
touch %{buildroot}@VDSMLOGDIR(a)/vdsm.log
# Install the respawn utility
@@ -879,7 +881,10 @@
%endif
%dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@
-%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) @VDSMLOGDIR(a)/vdsm.log
+%config %attr(0644, %{vdsm_user}, %{vdsm_group}) @VDSMLOGDIR(a)/metadata.log
+%config %attr(0644, %{vdsm_user}, %{vdsm_group}) @VDSMLOGDIR(a)/mom.log
+%config %attr(0644, root, root) @VDSMLOGDIR(a)/supervdsm.log
+%config %attr(0644, %{vdsm_user}, %{vdsm_group}) @VDSMLOGDIR(a)/vdsm.log
%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/hsm-tasks
%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/mnt
%dir %{_libexecdir}/%{vdsm_name}
--
To view, visit http://gerrit.ovirt.org/23786
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2776b8518930393b281a1885268813f8d4d7c85b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
10 years, 3 months
Change in vdsm[master]: vdsm_hooks/hostusb: Allow multiple usb devices with same ven...
by iheim@redhat.com
Itamar Heim has posted comments on this change.
Change subject: vdsm_hooks/hostusb: Allow multiple usb devices with same vendor and product id
......................................................................
Patch Set 11:
ping?
--
To view, visit http://gerrit.ovirt.org/14237
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I831d047e5a2284dcc2e4db7608a9831e64f9c8dc
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: David Guglielmi <david.guglielmi(a)gmail.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: David Guglielmi <david.guglielmi(a)gmail.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
10 years, 3 months
Change in vdsm[master]: vm.py: Always use 'qemu' domain type in fake mode
by vitor.lima@eldorado.org.br
Vitor de Lima has uploaded a new change for review.
Change subject: vm.py: Always use 'qemu' domain type in fake mode
......................................................................
vm.py: Always use 'qemu' domain type in fake mode
This patch forces the libvirt domain type to be 'qemu' if the fake kvm
mode is enabled. This fixes problems faking ppc64 support in x86-64
hosts.
Change-Id: I875854ccc4d884aa36a77cd062521889622e567d
Signed-off-by: Vitor de Lima <vitor.lima(a)eldorado.org.br>
---
M tests/vmTests.py
M vdsm/vm.py
2 files changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/38/23938/1
diff --git a/tests/vmTests.py b/tests/vmTests.py
index 6215041..27ce1f2 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -26,6 +26,7 @@
from vdsm import constants
from testrunner import VdsmTestCase as TestCaseBase
import caps
+from vdsm import config
from vdsm import utils
from vdsm import libvirtconnection
from monkeypatch import MonkeyPatch
@@ -85,6 +86,7 @@
shutil.rmtree(constants.P_VDSM_RUN)
constants.P_VDSM_RUN = oldVdsmRun
+ @MonkeyPatch(config.config, 'getboolean', lambda s, k: False)
def testDomXML(self):
expectedXML = """
<domain type="kvm">
@@ -608,6 +610,7 @@
self.assertEquals(cm.exception.args[0], exceptionMsg)
+ @MonkeyPatch(config.config, 'getboolean', lambda s, k: False)
@MonkeyPatch(caps, 'getTargetArch', lambda: caps.Architecture.X86_64)
@MonkeyPatch(caps, 'osversion', lambda: {
'release': '1', 'version': '18', 'name': 'Fedora'})
@@ -619,6 +622,7 @@
def testBuildCmdLineX86_64(self):
self.assertBuildCmdLine(CONF_TO_DOMXML_X86_64)
+ @MonkeyPatch(config.config, 'getboolean', lambda s, k: False)
@MonkeyPatch(caps, 'getTargetArch', lambda: caps.Architecture.PPC64)
@MonkeyPatch(caps, 'osversion', lambda: {
'release': '1', 'version': '18', 'name': 'Fedora'})
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 5bdd9cc..e1a1651 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -915,7 +915,8 @@
self.doc = xml.dom.minidom.Document()
- if utils.tobool(self.conf.get('kvmEnable', 'true')):
+ if not config.getboolean('vars', 'fake_kvm_support') and \
+ utils.tobool(self.conf.get('kvmEnable', 'true')):
domainType = 'kvm'
else:
domainType = 'qemu'
--
To view, visit http://gerrit.ovirt.org/23938
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I875854ccc4d884aa36a77cd062521889622e567d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vitor de Lima <vitor.lima(a)eldorado.org.br>
10 years, 3 months
Change in vdsm[master]: vm: implement recommended clock settings
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: vm: implement recommended clock settings
......................................................................
vm: implement recommended clock settings
A new set of recommended clock settings emerged as follows:
<clock ...>
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
</clock>
THose settings are recommended by both libvirt and qemu developers,
and they apply for all guest OSes.
Some of them don't affect some OSes, but in those cases they are harmless.
This patch updates the XML generation according with
the new recommendations.
Change-Id: Icb0752e54a4cb9ff609b8ddfaf5c8fe2ed5b9e72
Bug-Url: https://bugzilla.redhat.com/1053846
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M tests/vmTests.py
M tests/vmTestsData.py
M vdsm/vm.py
3 files changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/23663/1
diff --git a/tests/vmTests.py b/tests/vmTests.py
index 6215041..1e0a3f6 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -214,6 +214,8 @@
clockXML = """
<clock adjustment="-3600" offset="variable">
<timer name="rtc" tickpolicy="catchup"/>
+ <timer name="pit" tickpolicy="delay"/>
+ <timer name="hpet" present="no"/>
</clock>"""
self.conf['timeOffset'] = '-3600'
domxml = vm._DomXML(self.conf, self.log,
diff --git a/tests/vmTestsData.py b/tests/vmTestsData.py
index b75c9dc..befa687 100644
--- a/tests/vmTestsData.py
+++ b/tests/vmTestsData.py
@@ -73,6 +73,8 @@
</sysinfo>
<clock adjustment="0" offset="variable">
<timer name="rtc" tickpolicy="catchup"/>
+ <timer name="pit" tickpolicy="delay"/>
+ <timer name="hpet" present="no"/>
</clock>
<features>
<acpi/>
@@ -133,6 +135,8 @@
</os>
<clock adjustment="0" offset="variable">
<timer name="rtc" tickpolicy="catchup"/>
+ <timer name="pit" tickpolicy="delay"/>
+ <timer name="hpet" present="no"/>
</clock>
<cputune/>
<cpu>
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 7c2d496..3aefb83 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -969,8 +969,9 @@
m = XMLElement('clock', offset='variable',
adjustment=str(self.conf.get('timeOffset', 0)))
- if utils.tobool(self.conf.get('tdf', True)):
- m.appendChildWithArgs('timer', name='rtc', tickpolicy='catchup')
+ m.appendChildWithArgs('timer', name='rtc', tickpolicy='catchup')
+ m.appendChildWithArgs('timer', name='pit', tickpolicy='delay')
+ m.appendChildWithArgs('timer', name='hpet', present='no')
self.dom.appendChild(m)
--
To view, visit http://gerrit.ovirt.org/23663
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb0752e54a4cb9ff609b8ddfaf5c8fe2ed5b9e72
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
10 years, 3 months
Change in vdsm[master]: tests: fix possible test failure due to reboot event
by mpoledni@redhat.com
Martin Polednik has uploaded a new change for review.
Change subject: tests: fix possible test failure due to reboot event
......................................................................
tests: fix possible test failure due to reboot event
Virt tests currently have a chance of failing even on successful run if
qemu bios startup takes a bit longer than ussual. This leads to halting
the VM right before initramfs services start, causing "reboot event"
(leading to state "RebootInProgress") causing test for upstates to fail.
This patch changes the default wait time to 30 seconds (through constant
VM_MINIMAL_UPTIME), giving the test run enough time to finish currectly.
In future, we would like to get rid of this time by adding a heartbeat
module to initramfs that would indicate successful boot, allowing for
faster test runs.
Change-Id: I469794f20b2b9de5837b7361b952b906b82d8498
Signed-off-by: Martin Polednik <mpoledni(a)redhat.com>
---
M tests/functional/virtTests.py
1 file changed, 5 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/23037/1
diff --git a/tests/functional/virtTests.py b/tests/functional/virtTests.py
index bd54621..94f9c74 100644
--- a/tests/functional/virtTests.py
+++ b/tests/functional/virtTests.py
@@ -49,6 +49,8 @@
]
_tmpinitramfs = False
+VM_MINIMAL_UPTIME = 30
+
def setUpModule():
# global used in order to keep the iniramfs image persistent across
@@ -185,7 +187,7 @@
'vmName': 'testSimpleVm'}
with RunningVm(self.vdsm, customization) as vm:
- self._waitForStartup(vm, 10)
+ self._waitForStartup(vm, VM_MINIMAL_UPTIME)
@requireKVM
@permutations([['localfs'], ['iscsi'], ['nfs']])
@@ -201,7 +203,7 @@
with RollbackContext() as rollback:
disk.createVdsmStorageLayout(conf, 3, rollback)
with RunningVm(self.vdsm, customization) as vm:
- self._waitForStartup(vm, 10)
+ self._waitForStartup(vm, VM_MINIMAL_UPTIME)
@requireKVM
@permutations([['hotplugNic'], ['virtioNic'], ['smartcard'],
@@ -258,7 +260,7 @@
customization['devices'].append(deviceDef[device])
with RunningVm(self.vdsm, customization) as vm:
- self._waitForStartup(vm, 10)
+ self._waitForStartup(vm, VM_MINIMAL_UPTIME)
if 'hotplugNic' in devices:
self.retryAssert(partial(self.vdsm.hotplugNic,
--
To view, visit http://gerrit.ovirt.org/23037
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I469794f20b2b9de5837b7361b952b906b82d8498
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoledni(a)redhat.com>
10 years, 3 months
Change in vdsm[ovirt-3.3]: Fix getStorageDomainInfo() logic.
by Federico Simoncelli
Hello Ayal Baron, Eduardo,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/20209
to review the following change.
Change subject: Fix getStorageDomainInfo() logic.
......................................................................
Fix getStorageDomainInfo() logic.
Domains with 'role' == MASTER_DOMAIN should always be attached
to a pool.
Detect 'stale' master domains.
Not hiding errors anymore.
Catching specific errors.
BC: If the domain is a Master but it is not connected to the actual
(host) pool, master_ver, host_id and lver are not returned.
Required for making repoStats pool independent.
Change-Id: I8b0b2ad3dca19cf203d937c1a9f6a12ab0f1095f
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/14671
Reviewed-by: Ayal Baron <abaron(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 21 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/09/20209/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 061182d..d46ef50 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -2737,17 +2737,29 @@
# BC) so it's not that horrible. In any case please
# remove this when we can stop supporting this API.
info.update({'lver': -1, 'spm_id': -1, 'master_ver': 0})
- if dom.getDomainRole() == sd.MASTER_DOMAIN:
- # make sure it's THE master
+ if info['role'] == sd.MASTER_DOMAIN:
try:
- pool = self.getPool(dom.getPools()[0])
- if pool.masterDomain.sdUUID == sdUUID:
- poolInfo = pool.getInfo()
- for key in ['lver', 'spm_id', 'master_ver']:
- info[key] = poolInfo['info'][key]
+ # Verify that the host is connected to the same pool which
+ # the SD is attached to.
+ pool = self.getPool(info['pool'][0])
+ except IndexError:
+ self.log.error("Domain %s is marked as master but is not "
+ "attached to any pool", sdUUID)
except se.StoragePoolUnknown:
- # Its pool is not connected
- pass
+ current = self.pools.keys()[0].spUUID if self.pools else None
+ self.log.error("Domain %s, marked as master, is attached to "
+ "pool %s but this host is connected to pool %s",
+ sdUUID, info['pool'], current, exc_info=True)
+ else:
+ # make sure it's THE master of this pool
+ if pool.masterDomain.sdUUID != sdUUID:
+ self.log.warn("Domain %s is marked as master but actual "
+ "master is %s",
+ sdUUID, pool.masterDomain.sdUUID)
+ else:
+ poolInfo = pool.getInfo()
+ for key in ('lver', 'spm_id', 'master_ver'):
+ info[key] = poolInfo[key]
return dict(info=info)
--
To view, visit http://gerrit.ovirt.org/20209
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b0b2ad3dca19cf203d937c1a9f6a12ab0f1095f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
10 years, 3 months
Change in vdsm[ovirt-3.3]: Avoid going into 'Paused' status during long lasting migrations
by Vinzenz Feenstra
Hello Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/23939
to review the following change.
Change subject: Avoid going into 'Paused' status during long lasting migrations
......................................................................
Avoid going into 'Paused' status during long lasting migrations
If a migration is taking longer than 'migration_timeout' the VM
moves into 'Paused' state on the destination host.
This patch increases the timeout to 6 hours as an absolute maximum
for the destination to wait for the migration to finish.
This is now reflected as the migration_destination_timeout.
If the VM after the timeout still has the state PAUSED and the
reason is `migration` we're going to raise an MigrationError and
will lead to the destruction of the VM on the destination.
In all other cases we're keeping the previous behaviour and are
continuing with normal VDSM tasks without touching the state of
the VM. That means that if the VM is in PAUSED state due to other
reasons than migration, it will stay PAUSED.
Change-Id: I6bb1c9ae7ead92093c0d300df7c3567ab20b1e09
Bug-Url: https://bugzilla.redhat.com/1059129
Signed-off-by: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/21963
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/config.py.in
M vdsm/vm.py
2 files changed, 30 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/23939/1
diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in
index ff4cebe..c85ab88 100644
--- a/lib/vdsm/config.py.in
+++ b/lib/vdsm/config.py.in
@@ -52,6 +52,9 @@
'recognized by kvm/qemu if a coma separated list given then a '
'NIC per device will be created.'),
+ ('migration_destination_timeout', '21600',
+ 'Maximum time the destination waits for the migration to finish.'),
+
('migration_timeout', '300',
'Maximum time the destination waits since migration is stalled. '
'Please note, that this is not overall migration timeout. '
diff --git a/vdsm/vm.py b/vdsm/vm.py
index f9b241e..d862839 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1695,6 +1695,10 @@
return m
+class MigrationError(Exception):
+ pass
+
+
class Vm(object):
"""
Used for abstracting communication between various parts of the
@@ -3465,23 +3469,37 @@
hooks.after_vm_dehibernate(self._dom.XMLDesc(0), self.conf,
{'FROM_SNAPSHOT': fromSnapshot})
elif 'migrationDest' in self.conf:
- timeout = config.getint('vars', 'migration_timeout')
- self.log.debug("Waiting %s seconds for end of migration" % timeout)
+ timeout = config.getint('vars', 'migration_destination_timeout')
+ self.log.debug("Waiting %s seconds for end of migration", timeout)
self._incomingMigrationFinished.wait(timeout)
+
try:
# Would fail if migration isn't successful,
# or restart vdsm if connection to libvirt was lost
self._dom = NotifyingVirDomain(
self._connection.lookupByUUIDString(self.id),
self._timeoutExperienced)
- except Exception as e:
- # Improve description of exception
+
if not self._incomingMigrationFinished.isSet():
- newMsg = ('%s - Timed out '
- '(did not receive success event)' %
- (e.args[0] if len(e.args) else
- 'Migration Error'))
- e.args = (newMsg,) + e.args[1:]
+ state = self._dom.state(0)
+ if state[0] == libvirt.VIR_DOMAIN_PAUSED:
+ if state[1] == libvirt.VIR_DOMAIN_PAUSED_MIGRATION:
+ raise MigrationError("Migration Error - Timed out "
+ "(did not receive success "
+ "event)")
+ self.log.debug("NOTE: incomingMigrationFinished event has "
+ "not been set and wait timed out after %d "
+ "seconds. Current VM state: %d, reason %d. "
+ "Continuing with VM initialization anyway.",
+ timeout, state[0], state[1])
+ except libvirt.libvirtError as e:
+ if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
+ if not self._incomingMigrationFinished.isSet():
+ newMsg = ('%s - Timed out '
+ '(did not receive success event)' %
+ (e.args[0] if len(e.args) else
+ 'Migration Error'))
+ e.args = (newMsg,) + e.args[1:]
raise
self._domDependentInit()
--
To view, visit http://gerrit.ovirt.org/23939
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bb1c9ae7ead92093c0d300df7c3567ab20b1e09
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
10 years, 3 months