Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: deployUtil: Add logging.error() to CPU virt check
......................................................................
deployUtil: Add logging.error() to CPU virt check
Adding logging.error() msg to help users in case CPU
virt support is disable in BIOS.
Change-Id: I3baff7594ad2cfcf4844a30586a2e4a4313a1972
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm_reg/deployUtil.py.in
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/3549/1
--
To view, visit http://gerrit.ovirt.org/3549
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3baff7594ad2cfcf4844a30586a2e4a4313a1972
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Mark Wu has uploaded a new change for review.
Change subject: Fix MountError exception handling in MountConnection.connect()
......................................................................
Fix MountError exception handling in MountConnection.connect()
The old code swallowed the exception of MountError if dir is removed
successfully. The patches re-raise the exception, which could be
MountError or OSError. In any case, it will stop executing the following
code.
Change-Id: Ic6d9ab419d717345c81fa8e8787e089ccd5a890f
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M vdsm/storage/storageServer.py
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/9503/1
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index 383e04c..6136777 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -202,7 +202,9 @@
os.rmdir(self._getLocalPath())
except OSError as e:
if e.errno != errno.ENOENT:
- raise
+ self.log.warn("Error while removing dir %s",
+ self._getLocalPath(), exc_info=True)
+ raise
try:
fileSD.validateDirAccess(self.getMountObj().getRecord().fs_file)
--
To view, visit http://gerrit.ovirt.org/9503
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6d9ab419d717345c81fa8e8787e089ccd5a890f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Mark Wu has uploaded a new change for review.
Change subject: Enable logging facility for test cases
......................................................................
Enable logging facility for test cases
In current code, there's no log handler configured. So make use of
the logging configured by nose.config for test cases.
Change-Id: Iaf727a2dfe38206737e0711466978277cd95ad34
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M tests/testrunner.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/3712/1
--
To view, visit http://gerrit.ovirt.org/3712
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf727a2dfe38206737e0711466978277cd95ad34
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Eduardo has uploaded a new change for review.
Change subject: BZ#836161 - Clean up.
......................................................................
BZ#836161 - Clean up.
Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 0 insertions(+), 71 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/8507/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 78fbe66..0ade40d 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -1766,73 +1766,6 @@
image.Image(repoPath).multiMove(srcDomUUID, dstDomUUID, imgDict, vmUUID, force)
- def deleteImage(self, sdUUID, imgUUID, postZero, force):
- """
- Deletes an Image folder with all its volumes.
-
- This function assumes that imgUUID is locked.
- In addition to removing image, this function also does the following:
- If removing a template from a backup SD which has dependent images:
- - creates a fake template.
- If removing the last image which depends on a fake template:
- - removes the fake template as well
- :param sdUUID: The UUID of the storage domain that contains the images.
- :type sdUUID: UUID
- :param imgUUID: The UUID of the image you want to delete.
- :type imgUUID: UUID
- :param postZero: bool
- :param force: Should the operation be forced.
- :type force: bool
- """
- # TODO: This function works on domains. No relation with pools.
- # Therefore move this to the relevant *sd module
- repoPath = os.path.join(self.storage_repository, self.spUUID)
- img = image.Image(repoPath)
- dom = sdCache.produce(sdUUID)
- allVols = dom.getAllVolumes()
- # Filter volumes related to this image
- imgsByVol = sd.getVolsOfImage(allVols, imgUUID)
- if all(len(v.imgs) == 1 for k, v in imgsByVol.iteritems()):
- # This is a self contained regular image, i.e. it's either an image
- # which is not based on a template or a template which has no
- # derived images, e.g. not derived from a template
- img.delete(sdUUID=sdUUID, imgUUID=imgUUID, postZero=postZero, force=force)
- else:
- # This is either a template with derived images or a derived image
- # so needs further scrutiny
- ts = tuple((volName, vol.imgs) for volName, vol in
- imgsByVol.iteritems() if len(vol.imgs) > 1)
- if len(ts) != 1:
- raise se.ImageValidationError("Image points to multiple"
- "templates %s in %s from %s" % \
- (ts, imgsByVol, allVols))
- # TODO: Lock the template, reload allVols.
- # template = ts[0] = [(tName, tImgs)]
- tName, tImgs = ts[0]
- # getAllVolumes makes the template self img the 1st one in tImgs
- templateImage = tImgs[0]
- numOfDependentImgs = len(tImgs) - 1
- if templateImage != imgUUID:
- # Removing an image based on a template
- img.delete(sdUUID=sdUUID, imgUUID=imgUUID, postZero=postZero, force=force)
- if numOfDependentImgs == 1 and dom.produceVolume(templateImage, tName).isFake():
- # Remove the fake template since last consumer was removed
- img.delete(sdUUID=sdUUID, imgUUID=templateImage, postZero=False, force=True)
-
- # Removing a template with dependencies
- elif force:
- img.delete(sdUUID=sdUUID, imgUUID=templateImage, postZero=postZero,
- force=force)
- elif not dom.isBackup():
- raise se.ImagesActionError("Can't remove template with children %s",
- allVols)
- else:
- # Removing a template with dependencies in backup domain
- # A fake template will be created
- img.delete(sdUUID=sdUUID, imgUUID=imgUUID, postZero=postZero, force=True)
- tParams = dom.produceVolume(imgUUID, tName).getVolumeParams()
- img.createFakeTemplate(sdUUID=sdUUID, volParams=tParams)
-
def mergeSnapshots(self, sdUUID, vmUUID, imgUUID, ancestor, successor, postZero):
"""
Merges the source volume to the destination volume.
@@ -2012,10 +1945,6 @@
def preDeleteRename(self, sdUUID, imgUUID):
repoPath = os.path.join(self.storage_repository, self.spUUID)
return image.Image(repoPath).preDeleteRename(sdUUID, imgUUID)
-
- def validateDelete(self, sdUUID, imgUUID):
- repoPath = os.path.join(self.storage_repository, self.spUUID)
- image.Image(repoPath).validateDelete(sdUUID, imgUUID)
def validateVolumeChain(self, sdUUID, imgUUID):
repoPath = os.path.join(self.storage_repository, self.spUUID)
--
To view, visit http://gerrit.ovirt.org/8507
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
Alon Bar-Lev has uploaded a new change for review.
Change subject: build: use architecture independent location of site-packages if possible
......................................................................
build: use architecture independent location of site-packages if possible
Currently all vdsm python modules go into pyexecdir, which is the
architecture specific location.
Python architecture independent modules should go into pythondir.
In x86_64 system locations are:
pythondir = /usr/lib/python2.7/site-packages
pyexecdir = /usr/lib64/python2.7/site-packages
Both are in default search path of python:
---
print(sys.path)"
['', '/root', '/usr/lib64/python27.zip', '/usr/lib64/python2.7',
'/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk',
'/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload',
'/usr/lib64/python2.7/site-packages',
'/usr/lib64/python2.7/site-packages/gst-0.10',
'/usr/lib64/python2.7/site-packages/gtk-2.0',
'/usr/lib/python2.7/site-packages',
'/usr/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']
---
In vdsm project only the betterPopen package is architecture specific,
it should go into pyexecdir while all other packages should go into
pythondir.
Change-Id: I975cab5c885697d3c43d083e243f8004587fd2bc
Signed-off-by: Alon Bar-Lev <alonbl(a)redhat.com>
---
M configure.ac
M vdsm/betterPopen/Makefile.am
2 files changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/6098/1
--
To view, visit http://gerrit.ovirt.org/6098
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I975cab5c885697d3c43d083e243f8004587fd2bc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Ryan Harper has uploaded a new change for review.
Change subject: vdsmd: remove bashisms found with checkbashism script on ubuntu
......................................................................
vdsmd: remove bashisms found with checkbashism script on ubuntu
Ubuntu uses dash for its /bin/sh and some of the shell scripting
includes bashisms that come through even with bash --posix (aka
/bin/sh -> /bin/bash.
Most of the fixes fall into the following changes:
- Using '=' instead of '==' for comparison
- Using '[ ]' instead of '[[ ]]' for test
- replacing {..} with seq
The remaining bashisms are around emitting messages, updating these
would require moving to using gettext's shell helper for producing
intl. lang equivalents.
To find files in the repository that need scanning, I looked for files
with '/bin/sh' in the file, excluding non-shell script files. For each
of the files that filtered through, I ran checkbashisms to see if the
file needed a closer look.
% find . -type f | egrep -v "(configure|build|aclocal|.py|Makefile|README|.git|autom4te.cache)" | xargs -i grep -l "/bin/sh" {}
./scripts/make_device_config.sh
./scripts/create_config
./scripts/feature_to_c.sh
./scripts/hxtool
./scripts/signrom.sh
./scripts/tracetool
./scripts/qemu-binfmt-conf.sh
./scripts/update-linux-headers.sh
./scripts/check-qerror.sh
./vdsm/sudoers.vdsm.in
./vdsm/vdsm-logrotate
./vdsm/vdsmd.init.in
./autogen.sh
./vdsm_cli/vdsClient.in
./tests/run_tests.sh.in
./tests/run_tests_local.sh.in
./vdsm_reg/vdsm-reg-logrotate
(platechiller) vdsm % find . -type f | egrep -v "(configure|build|aclocal|.py|Makefile|README|.git|autom4te.cache)" | xargs -i grep -l "/bin/sh" {} | xargs -i bash -c 'P={}; checkbashisms $P &>/dev/null || echo $P'
./vdsm/vdsmd.init.in
Only vdsmd.init.in needed fixing.
Change-Id: Iece592e9cc3dfa361c99812461d783bff7f780a0
Signed-off-by: Ryan Harper <ryanh(a)us.ibm.com>
---
M vdsm/vdsmd.init.in
1 file changed, 11 insertions(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/8336/1
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index 0012157..2c0e894 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -112,13 +112,13 @@
local listen_tcp auth_tcp ssl
ssl=`$GETCONFITEM $CONF_FILE vars ssl true | tr A-Z a-z`
- [ "$ssl" == true ] && return 0
+ [ "$ssl" = "true" ] && return 0
listen_tcp="`get_libvirt_conf_item $LCONF listen_tcp`"
auth_tcp="`get_libvirt_conf_item $LCONF auth_tcp`"
spice_tls="`get_libvirt_conf_item $QCONF spice_tls`"
- if [ "$listen_tcp" == 1 -a "$auth_tcp" == '"none"' -a "$spice_tls" == 0 ];
+ if [ "$listen_tcp" = "1" -a "$auth_tcp" = '"none"' -a "$spice_tls" = "0" ];
then
return 0
else
@@ -138,7 +138,7 @@
/sbin/chkconfig $srv off
if /sbin/service $srv status > /dev/null 2>&1;
then
- if [ "$srv" == "libvirt-guests" ]; then
+ if [ "$srv" = "libvirt-guests" ]; then
/bin/rm -f /var/lock/subsys/libvirt-guests
else
/sbin/service $srv stop
@@ -149,7 +149,7 @@
}
libvirt_should_use_upstart() {
- [[ -x /sbin/initctl ]]
+ [ -x /sbin/initctl ]
}
start_needed_srv() {
@@ -297,7 +297,7 @@
set_if_default $lconf host_uuid \"$(uuidgen)\"
set_if_default $qconf dynamic_ownership 0
- if [[ "$ssl" == true ]]; then
+ if [ "$ssl" = "true" ]; then
set_if_default $qconf spice_tls 1
else
set_if_default $qconf spice_tls 0
@@ -314,7 +314,7 @@
if [ -f $ts/certs/cacert.pem -a \
-f $ts/certs/vdsmcert.pem -a \
-f $ts/keys/vdsmkey.pem -a \
- "$ssl" == true ];
+ "$ssl" = "true" ];
then
set_if_default $lconf ca_file \"$ts/certs/cacert.pem\"
set_if_default $lconf cert_file \"$ts/certs/vdsmcert.pem\"
@@ -389,7 +389,7 @@
stop_libvirtd_sysv() {
# stop libvirt SysV service if we intend to configure upstart
- if libvirt_should_use_upstart && ! [[ -f /etc/init/libvirtd.conf ]]; then
+ if libvirt_should_use_upstart && ! [ -f /etc/init/libvirtd.conf ]; then
/sbin/chkconfig libvirtd off
/sbin/service libvirtd stop
fi
@@ -400,7 +400,7 @@
# its socket is not yet ready. Once issue fixed on libvirt,
# this workaround should be removed.
- for i in {1..50}
+ for i in $(seq 1 50)
do
if /usr/bin/virsh -r version > /dev/null 2>&1; then
return 0
@@ -426,14 +426,14 @@
/bin/grep libvirtd.upstart | /usr/bin/tail -1`
target=/etc/init/libvirtd.conf
- if [[ -f "$packaged" ]] && ! diff -q "$packaged" "$target" >/dev/null;
+ if [ -f "$packaged" ] && ! diff -q "$packaged" "$target" >/dev/null;
then
/bin/cp -p "$packaged" "$target" || return 1
/sbin/initctl reload-configuration
fi
startout=`/sbin/initctl start libvirtd 2>&1`
- if [[ "$?" -eq 0 || "$startout" =~ .*already\ running.* ]];
+ if [ "$?" -eq 0 || "$startout" =~ .*already\ running.* ];
then
await_libvirt_start_workaround
return 0
@@ -480,7 +480,7 @@
mk_dom_backup
mk_run_path
/bin/chmod 1777 /dev/shm
- if [ $is_coredump == true ]; then
+ if [ $is_coredump = "true" ]; then
export DAEMON_COREFILE_LIMIT=unlimited
echo $CORE_DUMP_PATH > $CORE_PATTERN
fi
--
To view, visit http://gerrit.ovirt.org/8336
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iece592e9cc3dfa361c99812461d783bff7f780a0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ryan Harper <ryanh(a)us.ibm.com>
Wenchao Xia has uploaded a new change for review.
Change subject: SUDO change, move fuser call to super vdsm
......................................................................
SUDO change, move fuser call to super vdsm
supervdsm.fuser() will return out result from executing, and
fuser.py will parse it.
Change-Id: I0bb881e6bcad213db1d186e70f41b22d78ee3ecf
Signed-off-by: wenchao xia <xiawenc(a)linux.vnet.ibm.com>
---
M vdsm/storage/fuser.py
M vdsm/supervdsmServer.py
2 files changed, 20 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/14/5314/1
--
To view, visit http://gerrit.ovirt.org/5314
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bb881e6bcad213db1d186e70f41b22d78ee3ecf
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Wenchao Xia <xiawenc(a)linux.vnet.ibm.com>