Change in vdsm[master]: libvirt_configure: restart libvirt on ovirtnode
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: libvirt_configure: restart libvirt on ovirtnode
......................................................................
libvirt_configure: restart libvirt on ovirtnode
In oVirt Node we do not expect users to interact directly on
console to execute admin steps. We should restart libvirt by script
and do not await users to execute such step.
Change-Id: Id13496dba80c6204b8d5e531e71deab7a59e85d3
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M lib/vdsm/tool/libvirt_configure.sh.in
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/20291/1
diff --git a/lib/vdsm/tool/libvirt_configure.sh.in b/lib/vdsm/tool/libvirt_configure.sh.in
index f9ac757..e43015f 100755
--- a/lib/vdsm/tool/libvirt_configure.sh.in
+++ b/lib/vdsm/tool/libvirt_configure.sh.in
@@ -311,12 +311,20 @@
echo "Reconfiguration of libvirt is done."
echo
- cat << __EOF__
+
+ if isOvirtNode; then
+ # On ovirt-node we should not expect admin to
+ # execute any manual step.
+ /usr/bin/vdsm-tool libvirt-configure-services-restart
+ else
+ cat << __EOF__
To start working with the new configuration, execute:
'vdsm-tool libvirt-configure-services-restart'
This will manage restarting of the following services:
libvirtd, supervdsmd
__EOF__
+ fi
+
echo
#
--
To view, visit http://gerrit.ovirt.org/20291
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id13496dba80c6204b8d5e531e71deab7a59e85d3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
10 years, 7 months
Change in vdsm[master]: Don't re-produce the same SD again.
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Don't re-produce the same SD again.
......................................................................
Don't re-produce the same SD again.
Anyway a similar SD is expected.
Change-Id: I7f5c267c8afa961bd5cde5e2b67d598a1fb5e486
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/18201/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 3f3c1bf..6694fe0 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -2007,8 +2007,9 @@
with rmanager.acquireResource(imageResourcesNamespace, imgUUID,
rm.LockType.exclusive):
+ dom = sdCache.produce(sdUUID)
for volUUID in volumes:
- sdCache.produce(sdUUID).produceVolume(imgUUID, volUUID).delete(
+ dom.produceVolume(imgUUID, volUUID).delete(
postZero=postZero, force=force)
def setMaxHostID(self, spUUID, maxID):
--
To view, visit http://gerrit.ovirt.org/18201
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f5c267c8afa961bd5cde5e2b67d598a1fb5e486
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
10 years, 7 months
Change in vdsm[master]: Report bond speed as function of slaved nics speed and bond ...
by apahim@redhat.com
Amador Pahim has uploaded a new change for review.
Change subject: Report bond speed as function of slaved nics speed and bond mode
......................................................................
Report bond speed as function of slaved nics speed and bond mode
Currently bond interfaces are always assumed to have 1GB of speed,
reflecting in inaccurate network usage calculations.
This patch add bond speed probe to netinfo.speed(), considering bond
mode and slaved nics speed:
Failover modes: 1 and 3
Bond speed = active slaved nic speed.
Load Balance modes: 0, 2, 4, 5 and 6
Bond speed = all slaved nics speed summed up.
Change-Id: Ide077846e49ac5e4d759a85ff9d5c6cec653aa18
Bug-Url: https://bugzilla.redhat.com/1007860
Signed-off-by: Amador Pahim <apahim(a)redhat.com>
---
M lib/vdsm/netinfo.py
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/19297/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index ba78dc9..885740b 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -297,6 +297,22 @@
s = int(speedFile.read())
if s not in (2 ** 16 - 1, 2 ** 32 - 1) or s > 0:
return s
+
+ # bondings() lists bond devices
+ if dev in bondings():
+ bond_options = bondOpts(dev)
+ # only bonds with slaved nics will be probed
+ if bond_options['slaves']:
+ # failover modes
+ if bond_options['mode'][1] in ['1', '3']:
+ s = speed(bond_options['active_slave'][0])
+ # load balance modes
+ elif bond_options['mode'][1] in ['0', '2', '4', '5', '6']:
+ s = 0
+ for slave in bond_options['slaves']:
+ s += speed(slave)
+ return s
+
except Exception:
logging.exception('cannot read %s speed', dev)
return 0
--
To view, visit http://gerrit.ovirt.org/19297
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide077846e49ac5e4d759a85ff9d5c6cec653aa18
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim <apahim(a)redhat.com>
10 years, 7 months
Change in vdsm[master]: tests: prevent hook validation decorator from leaving script...
by Nir Soffer
Nir Soffer has posted comments on this change.
Change subject: tests: prevent hook validation decorator from leaving scripts installed
......................................................................
Patch Set 5:
(3 comments)
....................................................
File tests/hookValidation.py
Line 65: except OSError as mkdir_error:
Line 66: if mkdir_error.errno == os.errno.EEXIST:
Line 67: directory_existed = True
Line 68: else:
Line 69: raise
You don't want to depend on os.errno - this is not public api, but a side effect of importing errno in the os module. To access error codes, import errno module.
Code is more clear when the normal flow is simple and conditionals are used to exit the normal flow.
Should be:
if mkdir_error.errno != errno.EEXIST:
raise
directory_existed = True
Line 70:
Line 71: cookie_file = _createHookScript(hook_path, hook_name, hook_script)
Line 72:
Line 73: output = None
Line 78: finally:
Line 79: if directory_existed:
Line 80: os.unlink(hook_path + '/' + hook_name)
Line 81: else:
Line 82: shutil.rmtree(hook_path)
This may raise - is it handled here?
Line 83:
Line 84: try:
Line 85: os.unlink(cookie_file)
Line 86: except OSError as unlink_error:
Line 86: except OSError as unlink_error:
Line 87: if unlink_error.errno == os.errno.ENOENT:
Line 88: pass
Line 89: else:
Line 90: raise
Same issue with normal flow. Should be:
if unlink_error.errno != errno.ENOENT:
raise
Line 91:
Line 92: if not functional:
Line 93: constants.P_VDSM_HOOKS = old_vdsm_hooks
Line 94:
--
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: 5
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: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
10 years, 7 months
Change in vdsm[master]: Rename Image.copy() to Image.collapse().
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Rename Image.copy() to Image.collapse().
......................................................................
Rename Image.copy() to Image.collapse().
Renaming this method in order to clarify it's result and
differentiate it from dict.copy()
Change-Id: I4b6ec44430465097baf4dd5a2e5bdf6e3842a33f
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/image.py
M vdsm/storage/sp.py
2 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/18232/1
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index a1aa79b..52e4b08 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -74,7 +74,7 @@
def _deleteImage(dom, imgUUID, postZero):
"""This ancillary function will be removed.
- Replaces Image.delete() in Image.[copy(), move(),multimove()].
+ Replaces Image.delete() in Image.[collapse(), move(),multimove()].
"""
allVols = dom.getAllVolumes()
imgVols = sd.getVolsOfImage(allVols, imgUUID)
@@ -645,9 +645,9 @@
if not pvol.isLegal() or pvol.isFake():
raise se.ImageIsNotLegalChain(imgUUID)
- def copy(self, sdUUID, vmUUID, srcImgUUID, srcVolUUID, dstImgUUID,
- dstVolUUID, descr, dstSdUUID, volType, volFormat, preallocate,
- postZero, force):
+ def collapse(self, sdUUID, vmUUID, srcImgUUID, srcVolUUID, dstImgUUID,
+ dstVolUUID, descr, dstSdUUID, volType, volFormat,
+ preallocate, postZero, force):
"""
Create new template/volume from VM.
Do it by collapse and copy the whole chain (baseVolUUID->srcVolUUID)
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 3f3c1bf..420545f 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -1741,7 +1741,7 @@
rmanager.acquireResource(dstImageResourcesNamespace,
dstImgUUID, rm.LockType.exclusive)
):
- dstUUID = image.Image(self.poolPath).copy(
+ dstUUID = image.Image(self.poolPath).collapse(
sdUUID, vmUUID, srcImgUUID, srcVolUUID, dstImgUUID,
dstVolUUID, descr, dstSdUUID, volType, volFormat, preallocate,
postZero, force)
--
To view, visit http://gerrit.ovirt.org/18232
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b6ec44430465097baf4dd5a2e5bdf6e3842a33f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
10 years, 7 months
Change in vdsm[master]: minor changes in libvirt connection
by mtayer@redhat.com
mooli tayer has uploaded a new change for review.
Change subject: minor changes in libvirt connection
......................................................................
minor changes in libvirt connection
change logging levels and use functools.wraps
Change-Id: I5b4b1ddea998adc3003255593dc139ca4321cbd0
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M lib/vdsm/libvirtconnection.py
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/19463/1
diff --git a/lib/vdsm/libvirtconnection.py b/lib/vdsm/libvirtconnection.py
index f0ac646..9d2dca6 100644
--- a/lib/vdsm/libvirtconnection.py
+++ b/lib/vdsm/libvirtconnection.py
@@ -26,6 +26,7 @@
import libvirt
from vdsm import constants, utils
+from functools import wraps
log = logging.getLogger("libvirtconnection")
@@ -71,6 +72,7 @@
take the current process down.
"""
def wrapMethod(f):
+ @wraps(f)
def wrapper(pingLibvirt=True, *args, **kwargs):
try:
ret = f(*args, **kwargs)
@@ -93,10 +95,10 @@
if pingLibvirt:
__connections.get(id(target)).getLibVersion(pingLibvirt=False)
else:
- log.error('connection to libvirt broken.'
- ' ecode: %d edom: %d', ecode, edom)
+ log.warning('connection to libvirt broken.'
+ ' ecode: %d edom: %d', ecode, edom)
if killOnFailure:
- log.error('taking calling process down.')
+ log.critical('taking calling process down.')
os.kill(os.getpid(), signal.SIGTERM)
else:
raise
@@ -104,8 +106,6 @@
'level: %d message: %s', ecode, edom,
e.get_error_level(), e.get_error_message())
raise
- wrapper.__name__ = f.__name__
- wrapper.__doc__ = f.__doc__
return wrapper
def req(credentials, user_data):
--
To view, visit http://gerrit.ovirt.org/19463
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b4b1ddea998adc3003255593dc139ca4321cbd0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mtayer(a)redhat.com>
10 years, 7 months
Change in vdsm[master]: Packaging: Fix vdsm.prerm of Ubuntu packaging scripts
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: Packaging: Fix vdsm.prerm of Ubuntu packaging scripts
......................................................................
Packaging: Fix vdsm.prerm of Ubuntu packaging scripts
On Ubuntu, qemu-sanlock.conf is not used, so there is no need to
restore it during the packaging removal.
Change-Id: Ic7ead24ae6321339565252794210652d2a2b0bc6
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M debian/vdsm.prerm
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/69/20169/1
diff --git a/debian/vdsm.prerm b/debian/vdsm.prerm
index 4ca854b..596c5be 100644
--- a/debian/vdsm.prerm
+++ b/debian/vdsm.prerm
@@ -31,7 +31,6 @@
/etc/default/libvirt-bin \
/etc/libvirt/libvirtd.conf \
/etc/libvirt/qemu.conf \
- /etc/libvirt/qemu-sanlock.conf \
/etc/logrotate.d/libvirtd \
/etc/sysctl.conf \
/etc/default/sanlock
--
To view, visit http://gerrit.ovirt.org/20169
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7ead24ae6321339565252794210652d2a2b0bc6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
10 years, 7 months
Change in vdsm[master]: tests: prevent hook validation decorator from leaving script...
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: tests: prevent hook validation decorator from leaving scripts installed
......................................................................
Patch Set 5: Code-Review-1
(1 comment)
oops, I failed to notice this little issue.
....................................................
File tests/hookValidation.py
Line 80: os.unlink(hook_path + '/' + hook_name)
Line 81: else:
Line 82: shutil.rmtree(hook_path)
Line 83:
Line 84: try:
that's exactly vdsm.utils.rmFile(cookie_file).
Line 85: os.unlink(cookie_file)
Line 86: except OSError as unlink_error:
Line 87: if unlink_error.errno == os.errno.ENOENT:
Line 88: pass
--
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: 5
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