Change in vdsm[master]: WIP storage: Alert for using vdsm.conf nfs_mount_options
by gpadgett@redhat.com
Greg Padgett has uploaded a new change for review.
Change subject: WIP storage: Alert for using vdsm.conf nfs_mount_options
......................................................................
WIP storage: Alert for using vdsm.conf nfs_mount_options
This adds a framework and an alert for when nfs_mount_options is used.
The nfs_mount_options setting is deprecated, so if it is set, send an
alert to the engine when it calls getVdsCapabilities. A mechanism to
send the alert was placed here in particular because it the interval in
which the engine calls this API most closely matches the interval in
which the problem can be found and/or corrected.
Note that this was originally for bug 826921, but a new bug will be
created specifically for the alerting code in subsequent patches.
Change-Id: I8520238e0b41eb95d035128681dc3b71a953e644
Bug-Url: https://bugzilla.redhat.com/826921
Signed-off-by: Greg Padgett <gpadgett(a)redhat.com>
---
M Makefile.am
M vdsm.spec.in
M vdsm/caps.py
M vdsm/storage/Makefile.am
M vdsm/storage/storage_exception.py
M vdsm_api/vdsmapi-schema.json
6 files changed, 42 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/79/8979/1
diff --git a/Makefile.am b/Makefile.am
index 2850256..3d7cb2c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,6 +68,7 @@
vdsm/parted_utils.py \
vdsm/rest/BindingREST.py \
vdsm/rest/Controller.py \
+ vdsm/storage/alerts.py \
vdsm/storage/blockVolume.py \
vdsm/storage/devicemapper.py \
vdsm/storage/domainMonitor.py \
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 37f37a3..7e35e4b 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -643,6 +643,7 @@
%{_libexecdir}/%{vdsm_name}/ovirt_functions.sh
%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh
%{_datadir}/%{vdsm_name}/storage/__init__.py*
+%{_datadir}/%{vdsm_name}/storage/alerts.py*
%{_datadir}/%{vdsm_name}/storage/blockSD.py*
%{_datadir}/%{vdsm_name}/storage/blockVolume.py*
%{_datadir}/%{vdsm_name}/storage/devicemapper.py*
diff --git a/vdsm/caps.py b/vdsm/caps.py
index cfe4caf..c33e23f 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -40,6 +40,7 @@
import hooks
from vdsm import utils
import storage.hba
+from storage.alerts import getStorageAlerts
# For debian systems we can use python-apt if available
try:
@@ -295,9 +296,16 @@
config.getint('vars', 'extra_mem_reserve'))
caps['guestOverhead'] = config.get('vars', 'guest_ram_overhead')
+ caps['alerts'] = _getAlerts()
+
return caps
+def _getAlerts():
+ # Only storage alerts are currently propagated
+ return getStorageAlerts()
+
+
def _getIfaceByIP(addr, fileName='/proc/net/route'):
remote = struct.unpack('I', socket.inet_aton(addr))[0]
for line in itertools.islice(file(fileName), 1, None):
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index cff09be..96cc368 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -23,6 +23,7 @@
vdsmstoragedir = $(vdsmdir)/storage
dist_vdsmstorage_PYTHON = \
__init__.py \
+ alerts.py \
blockSD.py \
blockVolume.py \
devicemapper.py \
diff --git a/vdsm/storage/storage_exception.py b/vdsm/storage/storage_exception.py
index 54e64e6..9275ae7 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -174,6 +174,17 @@
message = "Directory cleanup failure"
+class MiscDeprecatedNFSOptions(StorageException):
+ def __init__(self, options):
+ self.value = "options=%s" % (options,)
+ code = 2009
+ message = "Using deprecated nfs_mount_options parameter from vdsm.conf."\
+ " This parameter will continue to be supported in versions 3.x,"\
+ " but may be removed in a future version of oVirt. Please"\
+ " upgrade domains to V3 or greater and set the parameters from"\
+ " the GUI to ensure compatibility with future versions."
+
+
#################################################
# Volumes Exceptions
#################################################
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 5f0b391..5c7cc92 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -839,6 +839,22 @@
'key': 'SoftwarePackage', 'value': 'SoftwarePackageInfo'}
##
+# @Alert:
+#
+# Alert information for this Host.
+#
+# @code: The alert code
+#
+# @message: A detailed alert string
+#
+# @value: #optional Detailed alert parameters
+#
+# Since: 4.10.1
+##
+{'type': 'Alert',
+ 'data': {'code': 'int', 'message': 'str', '*value': 'str'}}
+
+##
# @VdsmCapabilities:
#
# Host information and capabilities.
@@ -900,6 +916,8 @@
# @netConfigDirty: Indicates if there are uncommitted changes to the
# network configuration
#
+# @alerts: A list of alerts for the host
+#
# Since: 4.10.0
#
# Notes: Since ovirt-engine cannot parse software versions in 'x.y.z' format,
@@ -919,7 +937,8 @@
'emulatedMachines': ['str'], 'ISCSIInitiatorName': 'str',
'HBAInventory': 'HbaInventory', 'vmTypes': ['VmType'],
'memSize': 'uint', 'reservedMem': 'uint',
- 'guestOverhead': 'uint', 'netConfigDirty': 'bool'}}
+ 'guestOverhead': 'uint', 'netConfigDirty': 'bool',
+ 'alerts': ['Alert']}}
##
# @Host.getCapabilities:
--
To view, visit http://gerrit.ovirt.org/8979
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8520238e0b41eb95d035128681dc3b71a953e644
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadgett(a)redhat.com>
11 years, 3 months
Change in vdsm[master]: Some pep8 indentation fixes
by smizrahi@redhat.com
Saggi Mizrahi has uploaded a new change for review.
Change subject: Some pep8 indentation fixes
......................................................................
Some pep8 indentation fixes
Change-Id: I5257c9fabd18c5518eceb50e1edc89afe8610456
Signed-off-by: Saggi Mizrahi <smizrahi(a)redhat.com>
---
M vdsm/storage/localFsSD.py
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/10627/1
diff --git a/vdsm/storage/localFsSD.py b/vdsm/storage/localFsSD.py
index 8731434..74becea 100644
--- a/vdsm/storage/localFsSD.py
+++ b/vdsm/storage/localFsSD.py
@@ -58,7 +58,7 @@
'version' - DOMAIN_VERSIONS
"""
cls.log.info("sdUUID=%s domainName=%s remotePath=%s "
- "domClass=%s", sdUUID, domainName, remotePath, domClass)
+ "domClass=%s", sdUUID, domainName, remotePath, domClass)
if not misc.isAscii(domainName) and not sd.supportsUnicode(version):
raise se.UnicodeArgumentException()
@@ -67,13 +67,13 @@
mntPath = fileUtils.transformPath(remotePath)
mntPoint = os.path.join(cls.storage_repository,
- sd.DOMAIN_MNT_POINT, mntPath)
+ sd.DOMAIN_MNT_POINT, mntPath)
cls._preCreateValidation(sdUUID, mntPoint, remotePath, version)
domainDir = os.path.join(mntPoint, sdUUID)
cls._prepareMetadata(domainDir, sdUUID, domainName, domClass,
- remotePath, storageType, version)
+ remotePath, storageType, version)
# create domain images folder
imagesDir = os.path.join(domainDir, sd.DOMAIN_IMAGES)
--
To view, visit http://gerrit.ovirt.org/10627
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5257c9fabd18c5518eceb50e1edc89afe8610456
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
11 years, 3 months
Change in vdsm[master]: converge IPC file manipulation function in svdsm
by lvroyce@linux.vnet.ibm.com
Royce Lv has uploaded a new change for review.
Change subject: converge IPC file manipulation function in svdsm
......................................................................
converge IPC file manipulation function in svdsm
Change-Id: Ic983da2043f09650fb63e06f4f1ac3d3e218bcc2
Signed-off-by: Royce Lv<lvroyce(a)linux.vnet.ibm.com>
---
M tests/superVdsmTests.py
M vdsm/supervdsm.py
M vdsm/supervdsmServer.py
3 files changed, 21 insertions(+), 20 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/84/10184/1
diff --git a/tests/superVdsmTests.py b/tests/superVdsmTests.py
index 87de66d..192c60f 100644
--- a/tests/superVdsmTests.py
+++ b/tests/superVdsmTests.py
@@ -27,8 +27,8 @@
superVdsmCmd = [getNeededPythonPath(), constants.EXT_PYTHON,
supervdsm.SUPERVDSM,
- self._authkey, str(os.getpid()),
- self.pidfile, self.timestamp, self.address,
+ self._authkey, str(os.getpid()), self.address,
+ self.pidfile, self.timestamp,
str(os.getuid())]
misc.execCmd(superVdsmCmd, sync=False, sudo=True)
sleep(2)
diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py
index 532d5ac..2fb3c6a 100644
--- a/vdsm/supervdsm.py
+++ b/vdsm/supervdsm.py
@@ -121,8 +121,8 @@
# to create its internal files and give to the passed uid the
# permissions to read those files.
superVdsmCmd = [constants.EXT_PYTHON, SUPERVDSM,
- self._authkey, str(os.getpid()),
- self.pidfile, self.timestamp, self.address,
+ self.address, self._authkey, str(os.getpid()),
+ self.pidfile, self.timestamp,
str(os.getuid())]
misc.execCmd(superVdsmCmd, sync=False, sudo=True)
diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py
index 5effd41..24d35ea 100755
--- a/vdsm/supervdsmServer.py
+++ b/vdsm/supervdsmServer.py
@@ -306,6 +306,20 @@
os.kill(os.getpid(), signal.SIGTERM)
+def _prepareIPCFiles(log, ipcPaths):
+ address, pidfile, timestamp, uid = ipcPaths
+ log.debug("Creating PID and TIMESTAMP files: %s, %s",
+ pidfile, timestamp)
+ spid = os.getpid()
+ with open(pidfile, "w") as f:
+ f.write(str(spid) + "\n")
+ with open(timestamp, "w") as f:
+ f.write(str(misc.getProcCtime(spid) + "\n"))
+
+ for f in (address, timestamp, pidfile):
+ chown(f, int(uid), METADATA_GROUP)
+
+
def main():
if _glusterEnabled:
def bind(func):
@@ -336,19 +350,10 @@
sys.exit(errno.EPERM)
log.debug("Parsing cmd args")
- authkey, parentPid, pidfile, timestamp, address, uid = sys.argv[1:]
- log.debug("Creating PID and TIMESTAMP files: %s, %s",
- pidfile, timestamp)
- spid = os.getpid()
- with open(pidfile, "w") as f:
- f.write(str(spid) + "\n")
- with open(timestamp, "w") as f:
- f.write(str(misc.getProcCtime(spid) + "\n"))
-
+ authkey, parentPid, address = sys.argv[1:4]
log.debug("Cleaning old socket %s", address)
- if os.path.exists(address):
- os.unlink(address)
+ utils.rmFile(address)
zombieReaper.registerSignalHandler()
@@ -363,16 +368,12 @@
log.debug("Creating remote object manager")
manager = _SuperVdsmManager(address=address, authkey=authkey)
manager.register('instance', callable=_SuperVdsm)
-
server = manager.get_server()
servThread = threading.Thread(target=server.serve_forever)
servThread.setDaemon(True)
servThread.start()
-
- for f in (address, timestamp, pidfile):
- chown(f, int(uid), METADATA_GROUP)
-
log.debug("Started serving super vdsm object")
+ _prepareIPCFiles(log, sys.argv[3:7])
# Python bug of thread.join() will block signal
# http://bugs.python.org/issue1167930
--
To view, visit http://gerrit.ovirt.org/10184
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic983da2043f09650fb63e06f4f1ac3d3e218bcc2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
11 years, 3 months
Change in vdsm[master]: PEP 8: fix ignored errors E12{6,7,8}
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: PEP 8: fix ignored errors E12{6,7,8}
......................................................................
Patch Set 2: Looks good to me, approved
verified with python-pep8-1.4. thanks!
--
To view, visit http://gerrit.ovirt.org/10674
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia857d54f0634f71af15b5198a613f9113f85a7a3
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 3 months
Change in vdsm[master]: PEP 8: fix ignored errors E12{6,7,8}
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: PEP 8: fix ignored errors E12{6,7,8}
......................................................................
PEP 8: fix ignored errors E12{6,7,8}
Change-Id: Ia857d54f0634f71af15b5198a613f9113f85a7a3
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M Makefile.am
M tests/alignmentScanTests.py
M tests/functional/sosPluginTests.py
M tests/getAllVolumesTests.py
M tests/guestIFTests.py
M tests/hooksTests.py
M tests/lsblkTests.py
M tests/resourceManagerTests.py
M tests/sslTests.py
M tests/testValidation.py
M vdsm-tool/passwd.py
M vdsm/constants.py.in
M vdsm/storage/blockVolume.py
M vdsm/storage/domainMonitor.py
M vdsm/storage/fileSD.py
M vdsm/storage/fileVolume.py
M vdsm/storage/hsm.py
M vdsm/storage/imageRepository/formatConverter.py
M vdsm/storage/localFsSD.py
M vdsm/storage/lvm.py
M vdsm/storage/multipath.py
M vdsm/storage/nfsSD.py
M vdsm/storage/outOfProcess.py
M vdsm/storage/resourceFactories.py
M vdsm/storage/safelease.py
M vdsm/storage/sd.py
M vdsm/storage/sdc.py
M vdsm/storage/storageServer.py
M vdsm/storage/storage_exception.py
M vdsm/storage/task.py
M vdsm/storage/taskManager.py
M vdsm/storage/volume.py
M vdsm_api/process-schema.py
M vdsm_cli/vdscli.py.in
M vdsm_hooks/vhostmd/after_vm_destroy.py
35 files changed, 480 insertions(+), 451 deletions(-)
Approvals:
Dan Kenigsberg: Looks good to me, approved
Zhou Zheng Sheng: Verified
--
To view, visit http://gerrit.ovirt.org/10674
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia857d54f0634f71af15b5198a613f9113f85a7a3
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 3 months
Change in vdsm[master]: PEP 8: fix ignored errors E12{6,7,8}
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: PEP 8: fix ignored errors E12{6,7,8}
......................................................................
Patch Set 1:
The original string literal in constants.py.in is right. This patch should not modify it. I update the patch and submit patch set 2 to keep the original string.
--
To view, visit http://gerrit.ovirt.org/10674
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia857d54f0634f71af15b5198a613f9113f85a7a3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 3 months
Change in vdsm[master]: PEP 8: fix ignored errors E12{6,7,8}
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: PEP 8: fix ignored errors E12{6,7,8}
......................................................................
Patch Set 2: Verified
Pass autobuild.sh. gitpydiff finds no changes on all the files except blockVolume.py . The change is about modifying a string literal. It's acceptable because the original string literal is bad formated, the modified one is right.
Detailed report:
1 difference(s)
first file: vdsm/storage/blockVolume.py
second file: /tmp/pydiff/vdsm/storage/blockVolume.py
((553, 'missing offset tag on volume%s/%s'), (556, 'missing offset tag on volume %s/%s'))
--
To view, visit http://gerrit.ovirt.org/10674
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia857d54f0634f71af15b5198a613f9113f85a7a3
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 3 months
Change in vdsm[master]: PEP 8: fix ignored errors E12{6,7,8}
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: PEP 8: fix ignored errors E12{6,7,8}
......................................................................
Patch Set 1:
Pass autobuild.sh. gitpydiff finds no changes on all the files except blockVolume.py . The change is about modifying a string literal. It's acceptable because the original string literal is bad formated, the modified one is right.
Detailed report:
1 difference(s)
first file: vdsm/storage/blockVolume.py
second file: /tmp/pydiff/vdsm/storage/blockVolume.py
((553, 'missing offset tag on volume%s/%s'),
(556, 'missing offset tag on volume %s/%s'))
--
To view, visit http://gerrit.ovirt.org/10674
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia857d54f0634f71af15b5198a613f9113f85a7a3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 3 months