Change in vdsm[ovirt-3.3]: sd.py: Remove sds from sdCache when connecting
by Allon Mureinik
Hello Ayal Baron, Federico Simoncelli,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/20254
to review the following change.
Change subject: sd.py: Remove sds from sdCache when connecting
......................................................................
sd.py: Remove sds from sdCache when connecting
When connecting to a storage server, pre-existing domains should be
removed, since we have no way of knowing what happened to these
domains in the meanwhile.
Change-Id: Ic0e0d0e970ce55acf92f7e39ec9cf2170e948274
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=950055
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/19995
Reviewed-by: Ayal Baron <abaron(a)redhat.com>
Reviewed-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/20254/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 061182d..1307699 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -2371,6 +2371,11 @@
self.log.debug("prefetch failed: %s",
sdCache.knownSDs, exc_info=True)
else:
+ # Any pre-existing domains in sdCache stand the chance of
+ # being invalid, since there is no way to know what happens
+ # to them while the storage is disconnected.
+ for sdUUID in doms.iterkeys():
+ sdCache.manuallyRemoveDomain(sdUUID)
sdCache.knownSDs.update(doms)
self.log.debug("knownSDs: {%s}", ", ".join("%s: %s.%s" %
--
To view, visit http://gerrit.ovirt.org/20254
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0e0d0e970ce55acf92f7e39ec9cf2170e948274
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
10 years, 7 months
Change in vdsm[master]: it fixes a bug in the hook validation decorator, that left t...
by asegurap@redhat.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: it fixes a bug in the hook validation decorator, that left tests scripts installed into the system. Now they're properly removed right after the tests
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
For visibility
....................................................
File tests/hookValidation.py
Line 79: shutil.rmtree(hook_path)
Line 80:
Line 81: try:
Line 82: os.unlink(cookie_file)
Line 83: except OSError:
It might be better to only pass when the OSError instance errno is ENOENT.
Line 84: pass
Line 85:
Line 86: if not functional:
Line 87: constants.P_VDSM_HOOKS = old_vdsm_hooks
--
To view, visit http://gerrit.ovirt.org/20310
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I138c3eab77ea6d35d6a997049940923026e06d96
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Miguel Angel Ajo Pelayo <miguelangel(a)ajo.es>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Miguel Angel Ajo Pelayo <miguelangel(a)ajo.es>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
10 years, 7 months
Re: [oVirt Jenkins] vdsm_create_rpms - Build # 758 - Failure!
by Dan Kenigsberg
Ohad, can we get python-cpopen on fedora19?
error: Failed build dependencies:
python-cpopen is needed by vdsm-4.13.0-53.git3a915c5.fc19.x86_64
On Thu, Oct 17, 2013 at 08:29:07PM +0100, Jenkins ci oVirt Server wrote:
> Project: http://jenkins.ovirt.org/job/vdsm_create_rpms/
> Build: http://jenkins.ovirt.org/job/vdsm_create_rpms/758/
> Build Number: 758
> Build Status: Failure
> Triggered By: Started by an SCM change
>
> -------------------------------------
> Changes Since Last Success:
> -------------------------------------
> Changes for Build #758
> [Zhou Zheng Sheng] Packaging: fix ./configure option for libvirt environment file
>
> [Zhou Zheng Sheng] Packaging: libvirt configuration detection should skip /dev/null
>
>
>
>
> -----------------
> Failed Tests:
> -----------------
> No tests ran.
>
10 years, 7 months
Change in vdsm[master]: hsm: fix isoprefix KeyError for inactive domains
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: hsm: fix isoprefix KeyError for inactive domains
......................................................................
hsm: fix isoprefix KeyError for inactive domains
In a recent change f9cf58b (Make getRepoStats() a hsm method) has been
introduced a regression that causes a KeyError on isoprefix for domains
that are inactive.
In this patch:
* fix the isoprefix KeyError for inactive domains
* fix indentation for a related block of code
Change-Id: Ice78a4d652d495aff8672524fcd80b7306013928
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/20250/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 849aa74..3254a17 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -2555,8 +2555,8 @@
domInfo = self._getDomsStats(pool.domainMonitor, doms)
for sdUUID in doms.iterkeys():
if domInfo[sdUUID]['isoprefix']:
- poolInfo['isoprefix'] = domInfo[sdUUID]['isoprefix']
- break
+ poolInfo['isoprefix'] = domInfo[sdUUID]['isoprefix']
+ break
else:
poolInfo['isoprefix'] = '' # No ISO domain found
@@ -3583,7 +3583,8 @@
for sdUUID, sdStatus in doms.iteritems():
# Return statistics for active domains only
- domInfo[sdUUID] = {'status': sdStatus, 'alerts': []}
+ domInfo[sdUUID] = {'status': sdStatus, 'alerts': [],
+ 'isoprefix': ''}
if sdStatus != sd.DOM_ACTIVE_STATUS or sdUUID not in repoStats:
continue
@@ -3615,9 +3616,8 @@
repoStats[sdUUID]['mdasize'],
repoStats[sdUUID]['mdafree'])
- isoprefix = repoStats[sdUUID]['isoprefix']
- domInfo[sdUUID]['isoprefix'] = \
- isoprefix if isoprefix is not None else ''
+ if repoStats[sdUUID]['isoprefix'] is not None:
+ domInfo[sdUUID]['isoprefix'] = repoStats[sdUUID]['isoprefix']
return domInfo
--
To view, visit http://gerrit.ovirt.org/20250
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice78a4d652d495aff8672524fcd80b7306013928
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
10 years, 7 months
Change in vdsm[master]: tests: typo fix
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: tests: typo fix
......................................................................
tests: typo fix
typo fix of package name
Change-Id: Id78207f763622838a843dcfc8917986088887b8c
Bug-Url: https://bugzilla.redhat.com/1020484
Signed-off-by: Russ Herrold <herrold(a)owlriver.com>
Reviewed-on: http://gerrit.ovirt.org/20277
Tested-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/tcTests.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Dan Kenigsberg: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/20277
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id78207f763622838a843dcfc8917986088887b8c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: r herrold <herrold(a)owlriver.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
10 years, 7 months
Change in vdsm[master]: tests: typo fix
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: tests: typo fix
......................................................................
Patch Set 1: Verified+1 Code-Review+2
Thanks!
--
To view, visit http://gerrit.ovirt.org/20277
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id78207f763622838a843dcfc8917986088887b8c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: r herrold <herrold(a)owlriver.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-HasComments: No
10 years, 7 months
Change in vdsm[master]: Make link state change monitoring use an async proc
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: Make link state change monitoring use an async proc
......................................................................
Make link state change monitoring use an async proc
Change-Id: Ief98bc08307652f541b7c9b87fca0499f9138b4f
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M tests/functional/networkTests.py
1 file changed, 10 insertions(+), 28 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/20259/1
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 7cb87ad..c95710f 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -17,9 +17,7 @@
# Refer to the README and COPYING files for full details of the license
#
from contextlib import contextmanager
-from threading import Thread
import os.path
-import time
import neterrors
@@ -34,7 +32,8 @@
from vdsm.ipwrapper import (ruleAdd, ruleDel, routeAdd, routeDel, routeExists,
ruleExists, Route, Rule, addrFlush)
-from vdsm.netinfo import operstate, prefix2netmask
+from vdsm.netinfo import prefix2netmask
+from vdsm.utils import execCmd
NETWORK_NAME = 'test-network'
@@ -85,34 +84,17 @@
@contextmanager
def nonChangingOperstate(device):
- """Raises an exception if it detects that the device operstate changes."""
- # The current implementation is raceful (but empirically tested to work)
- # due to the fact that two changes could happen between iterations and no
- # exception would be raised.
- def changed(dev, changes):
- status = operstate(dev)
- while not done:
- try:
- newState = operstate(dev)
- time.sleep(0.1)
- except IOError as ioe:
- _, message = ioe.args
- changes.append(message)
- break
- if status != newState:
- changes.append(newState)
- status = newState
-
+ """Raises an exception if it detects that the device link state changes."""
try:
- done = False
- changes = []
- monitoring_t = Thread(target=changed, name='operstate_mon',
- args=(device, changes))
- monitoring_t.start()
+ monitoringProc = execCmd(['ip', 'monitor', 'link'], sync=False)
yield
finally:
- time.sleep(3) # So that the last action in yield gets to kernel
- done = True
+ monitoringProc.kill()
+ out, _ = monitoringProc.communicate()
+ changes = []
+ for line in out.splitlines():
+ if ' %s:' % device in line:
+ changes.append(line.split()[-1])
if changes:
raise OperStateChangedError('%s operstate changed: %r' %
(device, changes))
--
To view, visit http://gerrit.ovirt.org/20259
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief98bc08307652f541b7c9b87fca0499f9138b4f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
10 years, 7 months