Change in vdsm[master]: Fix vdsClient.repoStats() bad path.
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Fix vdsClient.repoStats() bad path.
......................................................................
Fix vdsClient.repoStats() bad path.
(Or why using your list as a dict is bad.)
Change-Id: Idf7f6c367c83c2d00967e31dda6c9d0ef2fd3e57
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M client/vdsClient.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/64/19764/1
diff --git a/client/vdsClient.py b/client/vdsClient.py
index 5ecf04d..a393f1c 100644
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -1685,7 +1685,7 @@
stats = self.s.repoStats()
if stats['status']['code']:
print "count not get repo stats"
- return int(list['status']['code'])
+ return int(stats['status']['code'])
for d in stats:
if d == "status":
continue
--
To view, visit http://gerrit.ovirt.org/19764
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf7f6c367c83c2d00967e31dda6c9d0ef2fd3e57
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
9 years, 8 months
Change in vdsm[master]: vdsClient: is list a dict?
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: vdsClient: is list a dict?
......................................................................
vdsClient: is list a dict?
Short answer: NO!
Change-Id: Iacd7af3691eb2ed15b7fbb042f8ce43528dce31e
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M client/vdsClient.py
1 file changed, 22 insertions(+), 22 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/19763/1
diff --git a/client/vdsClient.py b/client/vdsClient.py
index 590b1e7..5ecf04d 100644
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -1642,44 +1642,44 @@
return status['status']['code'], status['power']
return status['status']['code'], status['status']['message']
- def __image_status(self, imgUUID, list):
- if "imagestatus" in list and "message" in list:
+ def __image_status(self, imgUUID, res):
+ if "imagestatus" in res and "message" in res:
status = "OK"
- if list["imagestatus"]:
+ if res["imagestatus"]:
status = "ERROR"
print ("Image %s status %s: %s (%s)" %
- (imgUUID, status, list["message"], list["imagestatus"]))
- if "badvols" in list:
- for v, err in list["badvols"].iteritems():
+ (imgUUID, status, res["message"], res["imagestatus"]))
+ if "badvols" in res:
+ for v, err in res["badvols"].iteritems():
print "\tVolume %s is bad: %s" % (v, err)
- def __domain_status(self, sdUUID, list):
- if "domainstatus" in list and "message" in list:
+ def __domain_status(self, sdUUID, res):
+ if "domainstatus" in res and "message" in res:
status = "OK"
- if list["domainstatus"]:
+ if res["domainstatus"]:
status = "ERROR"
print ("Domain %s status %s: %s (%s)" %
- (sdUUID, status, list["message"], list["domainstatus"]))
- if "badimages" in list:
- for i in list["badimages"]:
+ (sdUUID, status, res["message"], res["domainstatus"]))
+ if "badimages" in res:
+ for i in res["badimages"]:
print "\tImage %s is bad" % (i)
- self.__image_status(i, list["badimages"][i])
+ self.__image_status(i, res["badimages"][i])
- def __pool_status(self, spUUID, list):
- if "poolstatus" in list and "message" in list:
+ def __pool_status(self, spUUID, res):
+ if "poolstatus" in res and "message" in res:
status = "OK"
- if list["poolstatus"]:
+ if res["poolstatus"]:
status = "ERROR"
print ("Pool %s status %s: %s (%s)" %
- (spUUID, status, list["message"], list["poolstatus"]))
+ (spUUID, status, res["message"], res["poolstatus"]))
if "masterdomain":
- print "\tMaster domain is %s" % list["masterdomain"]
+ print "\tMaster domain is %s" % res["masterdomain"]
if "spmhost":
- print "\tThe SPM host id is %s" % list["spmhost"]
- if "baddomains" in list:
- for d in list["baddomains"]:
+ print "\tThe SPM host id is %s" % res["spmhost"]
+ if "baddomains" in res:
+ for d in res["baddomains"]:
print "\tDomain %s is bad:" % (d)
- self.__domain_status(d, list["baddomains"][d])
+ self.__domain_status(d, res["baddomains"][d])
def repoStats(self, args):
stats = self.s.repoStats()
--
To view, visit http://gerrit.ovirt.org/19763
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacd7af3691eb2ed15b7fbb042f8ce43528dce31e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
9 years, 8 months
Change in vdsm[ovirt-3.3]: Add support for direct setting of cpu_shares when creating a...
by Martin Sivak
Martin Sivák has uploaded a new change for review.
Change subject: Add support for direct setting of cpu_shares when creating a VM
......................................................................
Add support for direct setting of cpu_shares when creating a VM
This adds new API field to the Vm structures. The new field
'cpuShares' will override the old 'nice' when used.
Change-Id: I7ef73cf0579a0efd5a31c32638efcc6cdf2447d7
Signed-off-by: Martin Sivak <msivak(a)redhat.com>
---
M vdsm/vm.py
M vdsm_api/vdsmapi-schema.json
2 files changed, 15 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/17603/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 4333170..2440557 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -2805,8 +2805,15 @@
nice = int(self.conf.get('nice', '0'))
nice = max(min(nice, 19), 0)
+
+ # if cpu_shares weren't configured we derive the value from the
+ # niceness, cpu_shares has not unit, it is only meaningful when
+ # compared to other VMs (and can't be negative)
+ cpu_shares = int(self.conf.get('cpuShares', str((20 - nice) * 51)))
+ cpu_shares = max(cpu_shares, 0)
+
try:
- self._dom.setSchedulerParameters({'cpu_shares': (20 - nice) * 51})
+ self._dom.setSchedulerParameters({'cpu_shares': cpu_shares})
except:
self.log.warning('failed to set Vm niceness', exc_info=True)
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 73963cf..9430148 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -2629,6 +2629,8 @@
#
# @clientIp: The IP address of the client connected to the display
#
+# @cpuShares: The host scheduling priority (relative to other VMs)
+#
# @cpuType: #optional The type of CPU being emulated
# special values 'hostPassthrough' and 'hostModel'
# are reserved for host-passthrough and host-mode cpu
@@ -2691,8 +2693,8 @@
# Since: 4.10.0
##
{'type': 'VmDefinition',
- 'data': {'acpiEnable': 'bool', 'clientIp': 'str', '*cpuType': 'str',
- '*custom': 'StringMap', '*devices': ['VmDevice'],
+ 'data': {'acpiEnable': 'bool', 'clientIp': 'str', 'cpuShares': 'str',
+ '*cpuType': 'str', '*custom': 'StringMap', '*devices': ['VmDevice'],
'display': 'VmDisplayType', 'displayIp': 'str',
'displayPort': 'int', 'displaySecurePort': 'int',
'*emulatedMachine': 'str', '*keyboardLayout': 'str',
@@ -2710,6 +2712,8 @@
# Parameters for creating a new virtual machine
#
# @acpiEnable: Indicates if ACPI is enabled inside the VM
+#
+# @cpuShares: The host scheduling priority (relative to other VMs)
#
# @custom: #optional A dictionary of custom, free-form properties
#
@@ -2744,7 +2748,7 @@
##
{'type': 'VmParameters',
'data': {'acpiEnable': 'bool',
- '*custom': 'StringMap', '*devices': ['VmDevice'],
+ 'cpuShares': 'str', '*custom': 'StringMap', '*devices': ['VmDevice'],
'display': 'VmDisplayType', 'kvmEnable': 'bool', 'memSize': 'uint',
'nice': 'int', 'smp': 'uint', '*smpCoresPerSocket': 'uint',
'*smpThreadsPerCore': 'uint', 'timeOffset': 'uint',
--
To view, visit http://gerrit.ovirt.org/17603
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ef73cf0579a0efd5a31c32638efcc6cdf2447d7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Martin Sivák <msivak(a)redhat.com>
9 years, 8 months
Change in vdsm[ovirt-3.3]: Remove bonds before editing and adding
by asegurap@redhat.com
Hello Assaf Muller, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/18587
to review the following change.
Change subject: Remove bonds before editing and adding
......................................................................
Remove bonds before editing and adding
The current implementation of handleBondings relies on the
non-deterministic ordering of the bondings dictionary for choosing
which bonds should be handled first.
The correct ordering is to first delete all the bonds to remove,
then edit and finally add new bonds. This ensures that slaves
of bonds to remove are properly freed before being added to existing
or new bonds.
Change-Id: I3ea081fe7760b52f6febb4959f69851b2cf4c2a1
Bug-Url: https://bugzilla.redhat.com/987525
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/18500
Reviewed-by: Assaf Muller <amuller(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 26 insertions(+), 19 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/87/18587/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 155d22a..36edba7 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -398,26 +398,33 @@
_netinfo = netinfo.NetInfo()
- for bondName, bondAttrs in bondings.items():
- bond = Bond.objectivize(bondName, configurator,
- bondAttrs.get('options'),
- bondAttrs.get('nics'), mtu=None,
- _netinfo=_netinfo,
- destroyOnMasterRemoval='remove' in bondAttrs)
- if 'remove' in bondAttrs:
- logger.debug("Removing bond %s with attributes %s", bondName,
- bondAttrs)
- configurator.removeBond(bond)
- del bondings[bondName]
- del _netinfo.bondings[bondName]
- elif bondName in _netinfo.bondings:
- logger.debug("Editing bond %s with attributes %s", bondName,
- bondAttrs)
- configurator.editBonding(bond, _netinfo)
+ edition = []
+ addition = []
+ for name, attrs in bondings.items():
+ if 'remove' in attrs:
+ bond = Bond.objectivize(name, configurator, attrs.get('options'),
+ attrs.get('nics'), mtu=None,
+ _netinfo=_netinfo,
+ destroyOnMasterRemoval='remove' in attrs)
+ bond.remove()
+ del _netinfo.bondings[name]
+ elif name in _netinfo.bondings:
+ edition.append((name, attrs))
else:
- logger.debug("Creating bond %s with attributes %s", bondName,
- bondAttrs)
- configurator.configureBond(bond)
+ addition.append((name, attrs))
+
+ for name, attrs in edition:
+ bond = Bond.objectivize(name, configurator, attrs.get('options'),
+ attrs.get('nics'), mtu=None, _netinfo=_netinfo,
+ destroyOnMasterRemoval='remove' in attrs)
+ logger.debug("Editing bond %r with options %s", bond, bond.options)
+ configurator.editBonding(bond, _netinfo)
+ for name, attrs in addition:
+ bond = Bond.objectivize(name, configurator, attrs.get('options'),
+ attrs.get('nics'), mtu=None, _netinfo=_netinfo,
+ destroyOnMasterRemoval='remove' in attrs)
+ logger.debug("Creating bond %r with options %s", bond, bond.options)
+ configurator.configureBond(bond)
def _buildBondOptions(bondName, bondings, _netinfo):
--
To view, visit http://gerrit.ovirt.org/18587
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ea081fe7760b52f6febb4959f69851b2cf4c2a1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
9 years, 8 months
Change in vdsm[master]: Enable VM migration to old vdsm's.
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Enable VM migration to old vdsm's.
......................................................................
Enable VM migration to old vdsm's.
Old vdsm's can't run VM from /var/run/vdsm/storage and rely on
/rhev/data-center hierarchy.
Change-Id: Ia778ad743a11b4c1d212857d8f25c81eb4c0defe
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1011608
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/blockSD.py
M vdsm/storage/fileSD.py
M vdsm/storage/hsm.py
3 files changed, 22 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/19825/1
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index d27f331..b014253 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -1029,6 +1029,19 @@
vols, rems = self.getAllVolumesImages()
return rems
+ def linkBCImage(self, imgPath, imgUUID):
+ dst = os.path.join(self.mountpoint, self.sdUUID, sd.DOMAIN_IMAGES,
+ imgUUID)
+ try:
+ os.symlink(imgPath, dst)
+ except OSError as e:
+ if e.errno == errno.EEXIST:
+ self.log.debug("img run vol already exists: %s", dstVol)
+ else:
+ self.log.error("Failed to create img run vol: %s", dstVol)
+ raise
+ return dst
+
def createImageLinks(self, srcImgPath, imgUUID, volUUIDs):
"""
qcow chain is build by reading each qcow header and reading the path
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index 8e788a5..8da30bb 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -418,6 +418,10 @@
return dict((k, sd.ImgsPar(tuple(v['imgs']), v['parent']))
for k, v in volumes.iteritems())
+ def linkBCImage(self, imgPath, imgUUID):
+ return os.path.join(self.mountpoint, self.sdUUID, sd.DOMAIN_IMAGES,
+ imgUUID)
+
def createImageLinks(self, srcImgPath, imgUUID):
"""
qcow chain is build by reading each qcow header and reading the path
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 4f5a8a7..061182d 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3230,8 +3230,12 @@
# Filter volumes related to this image
imgVolumes = sd.getVolsOfImage(allVols, imgUUID).keys()
imgPath = dom.activateVolumes(imgUUID, imgVolumes)
+ if spUUID and spUUID != sd.BLANK_UUID:
+ runImgPath = dom.linkBCImage(imgPath, imgUUID)
+ else:
+ runImgPath = imgPath
- leafPath = os.path.join(imgPath, leafUUID)
+ leafPath = os.path.join(runImgPath, leafUUID)
for volUUID in imgVolumes:
path = os.path.join(dom.domaindir, sd.DOMAIN_IMAGES, imgUUID,
volUUID)
--
To view, visit http://gerrit.ovirt.org/19825
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia778ad743a11b4c1d212857d8f25c81eb4c0defe
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
9 years, 8 months
Change in vdsm[master]: Reintroduce afterMigrationStatus
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: Reintroduce afterMigrationStatus
......................................................................
Reintroduce afterMigrationStatus
In http://gerrit.ovirt.org/19306 I was fooled to believe that we can
drop the unused afterMigrationStatus parameter. However vdsm version
prior to that change (e.g. that of ovirt-3.3.0) expect to delete it.
Change-Id: Ibc55f7fc0d7debd1590011301c38565d27dc137e
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/19859/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index c375aec..bb4a7ec 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -285,6 +285,9 @@
new_drives.append(drive)
self._machineParams['drives'] = new_drives
+ # vdsm < 4.13 expect this to exist
+ self._machineParams['afterMigrationStatus'] = ''
+
def run(self):
try:
mstate = ''
--
To view, visit http://gerrit.ovirt.org/19859
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc55f7fc0d7debd1590011301c38565d27dc137e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
9 years, 8 months
Re: [oVirt Jenkins] vdsm_unit_tests - Build # 2379 - Failure!
by Dan Kenigsberg
On Thu, Oct 03, 2013 at 07:57:19AM +0100, Jenkins ci oVirt Server wrote:
> Project: http://jenkins.ovirt.org/job/vdsm_unit_tests/
> Build: http://jenkins.ovirt.org/job/vdsm_unit_tests/2379/
> Build Number: 2379
> Build Status: Failure
> Triggered By: Started by an SCM change
>
> -------------------------------------
> Changes Since Last Success:
> -------------------------------------
> Changes for Build #2379
>
>
>
> -----------------
> Failed Tests:
> -----------------
> 3 tests failed.
> REGRESSION: mkimageTests.MkimageTestCase.test_mkIsoFs(label=None)
Something on the slaves (and I do not currently care if it's gvfs or
not) is causing a leak of loopback devices. If we cannot solve the
problem, it is time to NOSE_EXCLUDE this test. Having people disregard
test results is more dangerous than skipping this test.
Dan.
9 years, 8 months
Change in vdsm[master]: Manage test dummies at the module level
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: Manage test dummies at the module level
......................................................................
Manage test dummies at the module level
We can handle the dummies at the global level so that less work needs
to be done per test and the cleanupNetwork decorator doesn't miss
the dummies that were previously already destroyed at that stage.
Change-Id: I5c040fc3175b5760728d749578728be60c75cb9b
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M tests/functional/dummy.py
M tests/functional/networkTests.py
2 files changed, 21 insertions(+), 20 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/19650/1
diff --git a/tests/functional/dummy.py b/tests/functional/dummy.py
index f285cc4..c11cf9a 100644
--- a/tests/functional/dummy.py
+++ b/tests/functional/dummy.py
@@ -75,20 +75,3 @@
linkSet(dummyName, [state])
except IPRoute2Error:
raise SkipTest('Failed to bring %s to state %s' % (dummyName, state))
-
-
-@contextmanager
-def dummyIf(num):
- """
- Manages a list of num dummy interfaces. Assumes root privileges.
- """
-
- dummies = []
- try:
- dummies = [create() for _ in range(num)]
- yield dummies
- except Exception:
- raise
- finally:
- for dummy in dummies:
- remove(dummy)
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index f7071b9..21ea0da 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -27,7 +27,6 @@
from testValidation import RequireDummyMod, ValidateRunningAsRoot
import dummy
-from dummy import dummyIf
from utils import cleanupNet, restoreNetConfig, SUCCESS, VdsProxy, cleanupRules
from vdsm.ipwrapper import (ruleAdd, ruleDel, routeAdd, routeDel, routeExists,
@@ -44,19 +43,38 @@
IP_CIDR = '24'
IP_NETWORK_AND_CIDR = IP_NETWORK + '/' + IP_CIDR
IP_GATEWAY = '240.0.0.254'
-IP_TABLE = '4026531841' # Current implementation converts ip to its 32 bit int
- # representation
+# Current implementation converts ip to its 32 bit int representation
+IP_TABLE = '4026531841'
+dummyPool = []
def setupModule():
"""Persists network configuration."""
vdsm = VdsProxy()
vdsm.save_config()
+ for _ in range(5):
+ dummyPool.append(dummy.create())
def tearDownModule():
"""Restores the network configuration previous to running tests."""
restoreNetConfig()
+ for nic in dummyPool:
+ dummy.remove(nic)
+
+
+@contextmanager
+def dummyIf(num):
+ """Manages a list of num dummy interfaces. Assumes root privileges."""
+ dummies = []
+ try:
+ dummies = [dummyPool.pop() for _ in range(num)]
+ yield dummies
+ except Exception:
+ raise
+ finally:
+ for nic in dummies:
+ dummyPool.append(nic)
class OperStateChangedError(ValueError):
--
To view, visit http://gerrit.ovirt.org/19650
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c040fc3175b5760728d749578728be60c75cb9b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
9 years, 8 months
Change in vdsm[master]: Raise specific exception when local path not exist
by tnisan@redhat.com
Tal Nisan has uploaded a new change for review.
Change subject: Raise specific exception when local path not exist
......................................................................
Raise specific exception when local path not exist
When trying to connect to local storage connection, raise a
specific exception in case the directory does not exist instead of
a general one
Change-Id: I9310e3895e30fa5b2ae9a092aa4c1fef508c8e96
Bug-Url: https://bugzilla.redhat.com/949292
Signed-off-by: Tal Nisan <tnisan(a)redhat.com>
---
M vdsm/storage/storageServer.py
M vdsm/storage/storage_exception.py
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/13724/1
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index 023f607..8eff315 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -463,6 +463,8 @@
self._path.replace("_", "__").replace("/", "_"))
def checkTarget(self):
+ if not os.path.exists(self._path):
+ raise se.StorageServerLocalDirNotExistError(self._path)
if not os.path.isdir(self._path):
raise se.StorageServerLocalNotDirError(self._path)
fileSD.validateDirAccess(self._path)
diff --git a/vdsm/storage/storage_exception.py b/vdsm/storage/storage_exception.py
index c2c3dc8..cb22cd0 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -1200,6 +1200,13 @@
message = "Connection Reference ID was not registered"
+class StorageServerLocalDirNotExistError(StorageException):
+ code = 480
+ message = "The specified local path does not exist"
+
+ def __init__(self, path):
+ self.value = "path = %s" % path
+
#################################################
# LVM related Exceptions
#################################################
--
To view, visit http://gerrit.ovirt.org/13724
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9310e3895e30fa5b2ae9a092aa4c1fef508c8e96
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <tnisan(a)redhat.com>
9 years, 8 months