Change in vdsm[master]: Check supervdsm execution return code
by ybronhei@redhat.com
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Check supervdsm execution return code
......................................................................
Check supervdsm execution return code
Change-Id: I1b15efaabd2e45eb2f752d9f2ad73400033f2983
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M tests/superVdsmTests.py
M vdsm/supervdsm.py
2 files changed, 9 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/28/14428/1
diff --git a/tests/superVdsmTests.py b/tests/superVdsmTests.py
index f03a2b7..200ab04 100644
--- a/tests/superVdsmTests.py
+++ b/tests/superVdsmTests.py
@@ -8,7 +8,6 @@
from vdsm import constants
from storage import misc
from monkeypatch import MonkeyPatch
-from time import sleep
@utils.memoized
@@ -31,8 +30,10 @@
self._authkey, str(os.getpid()),
self.pidfile, self.timestamp, self.address,
str(os.getuid())]
- misc.execCmd(superVdsmCmd, sync=False, sudo=True)
- sleep(2)
+ p = misc.execCmd(superVdsmCmd, sync=False, sudo=True)
+ p.wait(2)
+ if p.returncode:
+ raise AssertionError('failed to start supervdsm')
class TestSuperVdsm(TestCaseBase):
diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py
index b69d6ea..a4bf74f 100644
--- a/vdsm/supervdsm.py
+++ b/vdsm/supervdsm.py
@@ -25,7 +25,6 @@
import logging
import threading
import uuid
-from time import sleep
from errno import ENOENT, ESRCH
import storage.misc as misc
@@ -129,14 +128,16 @@
self.pidfile, self.timestamp, self.address,
str(os.getuid())]
- misc.execCmd(superVdsmCmd, sync=False, sudo=True)
- sleep(2)
+ p = utils.execCmd(superVdsmCmd, sync=False, sudo=True)
+ p.wait(2)
+ if p.returncode:
+ utils.panic('executing supervdsm failed')
def kill(self):
try:
with open(self.pidfile, "r") as f:
pid = int(f.read().strip())
- misc.execCmd([constants.EXT_KILL, "-9", str(pid)], sudo=True)
+ utils.execCmd([constants.EXT_KILL, "-9", str(pid)], sudo=True)
except Exception:
self._log.error("Could not kill old Super Vdsm %s",
exc_info=True)
--
To view, visit http://gerrit.ovirt.org/14428
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b15efaabd2e45eb2f752d9f2ad73400033f2983
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
11 years, 1 month
Change in vdsm[master]: readlines - added an error log message on except
by derez@redhat.com
Daniel Erez has uploaded a new change for review.
Change subject: readlines - added an error log message on except
......................................................................
readlines - added an error log message on except
fileSD -> readlines:
added an error log message on exception for
easing issues debugging.
Change-Id: I494baa1664968c260e4b8d3113e3d6d899176311
Signed-off-by: Daniel Erez <derez(a)redhat.com>
---
M vdsm/storage/fileSD.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/14266/1
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index db0ab7d..e730271 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -115,6 +115,7 @@
self._metafile = metafile
self._sdUUID = getDomUuidFromMetafilePath(metafile)
self._oop = oop.getProcessPool(self._sdUUID)
+ self._log = logging.getLogger("Storage.FileMetadataRW")
def readlines(self):
try:
@@ -122,6 +123,8 @@
self._metafile))
except (IOError, OSError) as e:
if e.errno != errno.ENOENT:
+ self._log.error("Could not retrieve metadata file for "
+ "domain in path %s", self._metafile)
raise
return []
--
To view, visit http://gerrit.ovirt.org/14266
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I494baa1664968c260e4b8d3113e3d6d899176311
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <derez(a)redhat.com>
11 years, 1 month
Change in vdsm[master]: clientIF: rescan devices on failed hotplugDisk
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: clientIF: rescan devices on failed hotplugDisk
......................................................................
clientIF: rescan devices on failed hotplugDisk
Change-Id: Ie5252a8ba6bf76c9eda3588c665ad379da3e9cfc
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=923773
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M vdsm/clientIF.py
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/13454/1
diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index ef9a19b..d669d86 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -276,13 +276,14 @@
# GUID drive format
elif "GUID" in drive:
- volPath = os.path.join("/dev/mapper", drive["GUID"])
-
- if not os.path.exists(volPath):
+ visibility = self.irs.getDevicesVisibility(drive["GUID"])
+ if visibility[drive["GUID"]] == False:
+ self.log.error("GUID: %s is not visible", drive["GUID"])
raise vm.VolumeError(drive)
res = self.irs.appropriateDevice(drive["GUID"], vmId)
if res['status']['code']:
+ self.log.error("Appropriate device %s failed", drive["GUID"])
raise vm.VolumeError(drive)
# UUID drive format
--
To view, visit http://gerrit.ovirt.org/13454
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5252a8ba6bf76c9eda3588c665ad379da3e9cfc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
11 years, 1 month