Change in vdsm[master]: Adding intellij project files to .gitignore
by mtayer@redhat.com
mooli tayer has uploaded a new change for review.
Change subject: Adding intellij project files to .gitignore
......................................................................
Adding intellij project files to .gitignore
Change-Id: I337ff8ea0e950ae94effb226a5170570b489d68a
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M .gitignore
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/16417/1
diff --git a/.gitignore b/.gitignore
index 01e8a96..82165f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,10 +2,12 @@
*.pyc
*.swp
*.tmp
+*.iml
*~
.deps
.project
.pydevproject
+.idea
INSTALL
Makefile
Makefile.in
--
To view, visit http://gerrit.ovirt.org/16417
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I337ff8ea0e950ae94effb226a5170570b489d68a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mtayer(a)redhat.com>
10 years, 9 months
Change in vdsm[master]: BindingJsonRpc: correctly stop reactors
by mhuntxu@gmail.com
Hunt Xu has uploaded a new change for review.
Change subject: BindingJsonRpc: correctly stop reactors
......................................................................
BindingJsonRpc: correctly stop reactors
vdsm raises an exception saying "AttributeError: 'str' object has no
attribute 'stop'". This commit fixes this problem.
Change-Id: I1060d04bb37b8732eee1678f40cb770716b0473e
Signed-off-by: huntxu <mhuntxu(a)gmail.com>
---
M vdsm_api/BindingJsonRpc.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/73/16473/1
diff --git a/vdsm_api/BindingJsonRpc.py b/vdsm_api/BindingJsonRpc.py
index f9c634e..b2fd506 100644
--- a/vdsm_api/BindingJsonRpc.py
+++ b/vdsm_api/BindingJsonRpc.py
@@ -108,5 +108,5 @@
def prepareForShutdown(self):
self.server.stop()
- for reactor in self._reactors:
+ for reactor in self._reactors.itervalues():
reactor.stop()
--
To view, visit http://gerrit.ovirt.org/16473
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1060d04bb37b8732eee1678f40cb770716b0473e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Hunt Xu <mhuntxu(a)gmail.com>
10 years, 9 months
Change in vdsm[master]: tests: Use uppercase label for floppy in mkimageTests
by mhuntxu@gmail.com
Hunt Xu has uploaded a new change for review.
Change subject: tests: Use uppercase label for floppy in mkimageTests
......................................................................
tests: Use uppercase label for floppy in mkimageTests
Commit 10c1c41fd8e in dosfstools: "Write uppercase letters in label."
That commit has been in dosfstools since version 3.0.16, and Fedora 19
uses version 3.0.20.
For quick reference(copied from dosfstools commit message):
* https://bugzilla.novell.com/show_bug.cgi?id=657011#c4
* http://support.microsoft.com/kb/71715/en-us
Change-Id: Iffcf1c1cfbb324330af13435bce2e0f991e84afe
Signed-off-by: huntxu <mhuntxu(a)gmail.com>
---
M tests/mkimageTests.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/16472/1
diff --git a/tests/mkimageTests.py b/tests/mkimageTests.py
index 7a1fef1..28b35bb 100644
--- a/tests/mkimageTests.py
+++ b/tests/mkimageTests.py
@@ -131,7 +131,7 @@
self._check_content()
@ValidateRunningAsRoot
- @permutations([[None], ['fslabel']])
+ @permutations([[None], ['FSLABEL']])
def test_mkFloppyFs(self, label):
"""
Tests mkimage.mkFloppyFs creating an image and checking its content.
--
To view, visit http://gerrit.ovirt.org/16472
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffcf1c1cfbb324330af13435bce2e0f991e84afe
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Hunt Xu <mhuntxu(a)gmail.com>
10 years, 9 months
Change in vdsm[master]: vdsm: fix config comment for migration_timeout
by peet@redhat.com
Peter V. Saveliev has uploaded a new change for review.
Change subject: vdsm: fix config comment for migration_timeout
......................................................................
vdsm: fix config comment for migration_timeout
The migration_timeout variable means not overall migration timeout,
but the timeout since migration is stalled. Each time when migration
does some progress, this timeout counter is reset. Thus, overall
migration time can be longer than migration_timeout, and this is
by design.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=970645
Signed-off-by: Peter V. Saveliev <peet(a)redhat.com>
Change-Id: Ic8f026d881e58016e43e654d1bbec2ddeeb1c679
---
M lib/vdsm/config.py.in
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/16382/1
diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in
index b510669..2a5618a 100644
--- a/lib/vdsm/config.py.in
+++ b/lib/vdsm/config.py.in
@@ -48,7 +48,8 @@
'NIC per device will be created.'),
('migration_timeout', '300',
- 'Maximum time the destination waits for migration to end. '
+ 'Maximum time the destination waits since migration is stalled. '
+ 'Please note, that this is not overall migration timeout. '
'Source waits twice as long (to avoid races).'),
('migration_listener_timeout', '30',
--
To view, visit http://gerrit.ovirt.org/16382
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8f026d881e58016e43e654d1bbec2ddeeb1c679
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Peter V. Saveliev <peet(a)redhat.com>
10 years, 9 months
Change in vdsm[master]: vdsm-tool: service management work with previous systemd rel...
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: vdsm-tool: service management work with previous systemd release
......................................................................
vdsm-tool: service management work with previous systemd release
The service management assumes systemctl automatically adds ".service"
suffix to the service name. This is true for the latest SystemD, but
before systemd-44-20.fc17 [1], this feature is not available.
This patch adds ".service" suffix before sending the service name to
systemctl, so it does not depend on the auto-suffixing feature any more.
[1] https://lists.fedoraproject.org/pipermail/package-announce/2012-October/0...
Change-Id: Ice83296bd88ed5bb13630694560cde58b050edbb
Reported-by: Deepak C Shetty <deepakcs(a)linux.vnet.ibm.com>
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M lib/vdsm/tool/service.py
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/79/16379/1
diff --git a/lib/vdsm/tool/service.py b/lib/vdsm/tool/service.py
index a294dca..06d9e83 100644
--- a/lib/vdsm/tool/service.py
+++ b/lib/vdsm/tool/service.py
@@ -110,11 +110,12 @@
if rc != 0:
raise ServiceOperationError(
"Error listing unit files", '\n'.join(out), '\n'.join(err))
+ fullName = srvName + ".service"
for line in out:
- if srvName + ".service" == line.split(" ", 1)[0]:
- return systemctlFun(srvName)
+ if fullName == line.split(" ", 1)[0]:
+ return systemctlFun(fullName)
raise ServiceNotExistError("%s is not native systemctl service" %
- srvName)
+ fullName)
return wrapper
@_systemctlNative
--
To view, visit http://gerrit.ovirt.org/16379
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice83296bd88ed5bb13630694560cde58b050edbb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
10 years, 9 months
Change in vdsm[master]: WIP vm payload: cloud-init - multiple files, custom volume l...
by gpadgett@redhat.com
Greg Padgett has uploaded a new change for review.
Change subject: WIP vm payload: cloud-init - multiple files, custom volume label
......................................................................
WIP vm payload: cloud-init - multiple files, custom volume label
Changes required for cloud-init integration: support multiple files and
custom volume labels in VM Payloads.
Change-Id: I5247d8f4ee01c0c871912a7998bdf958fc71ddd1
Signed-off-by: Greg Padgett <gpadgett(a)redhat.com>
---
M tests/mkimageTests.py
M vdsm/clientIF.py
M vdsm/mkimage.py
M vdsm/supervdsmServer.py
4 files changed, 32 insertions(+), 16 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/14347/1
diff --git a/tests/mkimageTests.py b/tests/mkimageTests.py
index 8c8c59e..ac1252c 100644
--- a/tests/mkimageTests.py
+++ b/tests/mkimageTests.py
@@ -107,7 +107,7 @@
Tests mkimage.mkFloppyFs creating an image and checking its content.
Requires root permissions for writing into the floppy image.
"""
- floppy = mkimage.mkFloppyFs("vmId_floppy", self.files)
+ floppy = mkimage.mkFloppyFs("vmId_floppy", self.files, None)
self.assertTrue(os.path.exists(floppy))
m = storage.mount.Mount(floppy, self.workdir)
m.mount(mntOpts='loop')
@@ -123,7 +123,8 @@
"""
checkSudo(["mount", "-o", "loop", "somefile", "target"])
checkSudo(["umount", "target"])
- iso_img = mkimage.mkIsoFs("vmId_iso", self.files)
+ iso_img = mkimage.mkIsoFs("vmId_iso", self.files, None)
+ # TODO add test for label, same in test_mkFloppyFs above
self.assertTrue(os.path.exists(iso_img))
m = storage.mount.Mount(iso_img, self.workdir)
m.mount(mntOpts='loop')
diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index ed7db4b..0c9f9ce 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -297,7 +297,8 @@
'vmPayload' in drive['specParams']:
'''
vmPayload is a key in specParams
- 'vmPayload': {'file': {'filename': 'content'}}
+ 'vmPayload': {'volId': 'volume id', # volId is optional
+ 'file': {'filename': 'content', ...}}
'''
mkFsNames = {'cdrom': 'mkIsoFs', 'floppy': 'mkFloppyFs'}
try:
@@ -307,10 +308,11 @@
raise vm.VolumeError("Unsupported 'device': %s in "
"drive: %" % (drive['device'], drive))
else:
- # the only reason for adding this variable is that
+ # the only reason for adding these variables is that
# you can not write this without breaking PEP8
- file_name = drive['specParams']['vmPayload']['file']
- volPath = mkFsFunction(vmId, file_name)
+ file_list = drive['specParams']['vmPayload']['file']
+ volId = drive['specParams']['vmPayload'].get('volId', None)
+ volPath = mkFsFunction(vmId, file_list, volId)
elif "path" in drive:
volPath = drive['path']
diff --git a/vdsm/mkimage.py b/vdsm/mkimage.py
index 0eabae2..7e5ff18 100644
--- a/vdsm/mkimage.py
+++ b/vdsm/mkimage.py
@@ -35,7 +35,7 @@
_P_PAYLOAD_IMAGES = os.path.join(P_VDSM_RUN, 'payload')
-def _decodeFilesIntoDir(files, dirname):
+def _decodeFilesIntoDir(files, parentdir):
'''
create temp files from files list
@@ -47,7 +47,14 @@
'''
for name, content in files.iteritems():
- filename = os.path.join(dirname, name)
+ filename = os.path.join(parentdir, name)
+ dirname = os.path.dirname(filename)
+ if not os.path.exists(dirname):
+ try:
+ os.makedirs(dirname)
+ except OSError as e:
+ if e.errno != os.errno.EEXIST:
+ raise
with file(filename, 'w') as f:
f.write(base64.b64decode(content))
@@ -74,11 +81,14 @@
return path
-def mkFloppyFs(vmId, files):
+def mkFloppyFs(vmId, files, volId):
floppy = dirname = None
try:
floppy = _getFileName(vmId, files)
- command = [EXT_MKFS_MSDOS, '-C', floppy, '1440']
+ if volId:
+ command = [EXT_MKFS_MSDOS, '-C', floppy, '1440', '-n', volId]
+ else:
+ command = [EXT_MKFS_MSDOS, '-C', floppy, '1440']
rc, out, err = storage.misc.execCmd(command, raw=True)
if rc:
raise OSError(errno.EIO, "could not create floppy file: "
@@ -97,14 +107,17 @@
return floppy
-def mkIsoFs(vmId, files):
+def mkIsoFs(vmId, files, volId):
dirname = isopath = None
try:
dirname = tempfile.mkdtemp()
_decodeFilesIntoDir(files, dirname)
isopath = _getFileName(vmId, files)
- command = [EXT_MKISOFS, '-r', '-o', isopath, dirname]
+ if volId:
+ command = [EXT_MKISOFS, '-r', '-o', isopath, '-V', volId, dirname]
+ else:
+ command = [EXT_MKISOFS, '-r', '-o', isopath, dirname]
rc, out, err = storage.misc.execCmd(command, raw=True)
if rc:
raise OSError(errno.EIO, "could not create iso file: "
diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py
index 28d5955..4d80bbe 100755
--- a/vdsm/supervdsmServer.py
+++ b/vdsm/supervdsmServer.py
@@ -293,12 +293,12 @@
tc.unsetPortMirroring(networkName, target)
@logDecorator
- def mkFloppyFs(self, vmId, files):
- return mkimage.mkFloppyFs(vmId, files)
+ def mkFloppyFs(self, vmId, files, volId):
+ return mkimage.mkFloppyFs(vmId, files, volId)
@logDecorator
- def mkIsoFs(self, vmId, files):
- return mkimage.mkIsoFs(vmId, files)
+ def mkIsoFs(self, vmId, files, volId):
+ return mkimage.mkIsoFs(vmId, files, volId)
@logDecorator
def removeFs(self, path):
--
To view, visit http://gerrit.ovirt.org/14347
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5247d8f4ee01c0c871912a7998bdf958fc71ddd1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadgett(a)redhat.com>
10 years, 9 months
Change in vdsm[master]: vm payload: creation of full pathnames in payload
by gpadgett@redhat.com
Greg Padgett has uploaded a new change for review.
Change subject: vm payload: creation of full pathnames in payload
......................................................................
vm payload: creation of full pathnames in payload
Change required for cloud-init integration: support the creation of
payloads with files residing in subdirectories of the payload image.
Change-Id: Ifd76b5d9a3b79126dfcb764ac368a3631d743d1c
Bug-Url: https://bugzilla.redhat.com/619761
Signed-off-by: Greg Padgett <gpadgett(a)redhat.com>
---
M vdsm/mkimage.py
1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/16072/1
diff --git a/vdsm/mkimage.py b/vdsm/mkimage.py
index 0eabae2..9b3c00a 100644
--- a/vdsm/mkimage.py
+++ b/vdsm/mkimage.py
@@ -35,7 +35,7 @@
_P_PAYLOAD_IMAGES = os.path.join(P_VDSM_RUN, 'payload')
-def _decodeFilesIntoDir(files, dirname):
+def _decodeFilesIntoDir(files, parentdir):
'''
create temp files from files list
@@ -47,7 +47,14 @@
'''
for name, content in files.iteritems():
- filename = os.path.join(dirname, name)
+ filename = os.path.join(parentdir, name)
+ dirname = os.path.dirname(filename)
+ if not os.path.exists(dirname):
+ try:
+ os.makedirs(dirname)
+ except OSError as e:
+ if e.errno != os.errno.EEXIST:
+ raise
with file(filename, 'w') as f:
f.write(base64.b64decode(content))
--
To view, visit http://gerrit.ovirt.org/16072
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd76b5d9a3b79126dfcb764ac368a3631d743d1c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadgett(a)redhat.com>
10 years, 9 months
Change in vdsm[master]: Remove unused hsm._hsmSchedule()
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Remove unused hsm._hsmSchedule()
......................................................................
Remove unused hsm._hsmSchedule()
Related to: BZ#960952.
Change-Id: I92b9fcd899463157951fb76ab7ac6dfb4b47caf9
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 0 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/16411/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 5a5b4fb..f0faee2 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -396,10 +396,6 @@
storageRefreshThread.daemon = True
storageRefreshThread.start()
- def _hsmSchedule(self, name, func, *args):
- self.taskMng.scheduleJob("hsm", self.tasksDir, vars.task,
- name, func, *args)
-
def __validateLvmLockingType(self):
"""
Check lvm locking type.
--
To view, visit http://gerrit.ovirt.org/16411
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I92b9fcd899463157951fb76ab7ac6dfb4b47caf9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
10 years, 9 months
Change in vdsm[master]: PEP8: fix tests/hooksTests.py
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: PEP8: fix tests/hooksTests.py
......................................................................
PEP8: fix tests/hooksTests.py
pep8 1.4.6 gives the following error
tests/hooksTests.py:140:23: E127 continuation line over-indented for
visual indent
tests/hooksTests.py:141:18: E124 closing bracket does not match visual
indentation
And pep8 1.4.5 on RHEL6 gives the following error
vdsm/guestIF.py:30:5: E122 continuation line missing indentation or
outdented
This patch fixes the errors while makes pep8 1.4.5 and 1.4.6 both agree
with the fix.
Change-Id: Ib6f8843f7bf9f57c040b4747e89ce90ee6122823
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M tests/hooksTests.py
M vdsm/guestIF.py
2 files changed, 8 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/16424/1
diff --git a/tests/hooksTests.py b/tests/hooksTests.py
index 9e65212..001f329 100644
--- a/tests/hooksTests.py
+++ b/tests/hooksTests.py
@@ -136,9 +136,9 @@
def test_deviceVmConfProperties(self):
dirName = self._deviceCustomPropertiesTestFile()
- vmconf = {'custom':
- {'customProperty': ' rocks more!'}
- }
+ vmconf = {
+ 'custom': {
+ 'customProperty': ' rocks more!'}}
result = hooks._runHooksDir("oVirt", dirName,
params={'customProperty': ' rocks!'},
diff --git a/vdsm/guestIF.py b/vdsm/guestIF.py
index 569aa9d..07f9c20 100644
--- a/vdsm/guestIF.py
+++ b/vdsm/guestIF.py
@@ -25,9 +25,11 @@
import json
import supervdsm
-__RESTRICTED_CHARS = set(range(8 + 1)).union(
- set(range(0xB, 0xC + 1))).union(set(range(0xE, 0x1F + 1))).union(
- set(range(0x7F, 0x84 + 1))).union(set(range(0x86, 0x9F + 1)))
+__RESTRICTED_CHARS = set(range(8 + 1)). \
+ union(set(range(0xB, 0xC + 1))). \
+ union(set(range(0xE, 0x1F + 1))). \
+ union(set(range(0x7F, 0x84 + 1))). \
+ union(set(range(0x86, 0x9F + 1)))
def _filterXmlChars(u):
--
To view, visit http://gerrit.ovirt.org/16424
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib6f8843f7bf9f57c040b4747e89ce90ee6122823
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
10 years, 9 months
Change in vdsm[master]: Adding to make a print of pep8 and pyflakes versions
by ybronhei@redhat.com
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Adding to make a print of pep8 and pyflakes versions
......................................................................
Adding to make a print of pep8 and pyflakes versions
Change-Id: I59214cee459f63bddb5e516db01c16c4abe934e3
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M Makefile.am
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/16429/1
diff --git a/Makefile.am b/Makefile.am
index ec8f914..beea7ba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -78,6 +78,7 @@
'lv' from line .*"
check-local:
+ echo 'checking style: pep8 version' `pep8 --version` 'pyflakes version' `pyflakes --version`
find . -path './.git' -prune -type f -o \
-name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES) | \
grep -w -v $(SKIP_PYFLAKES_ERR) | \
--
To view, visit http://gerrit.ovirt.org/16429
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I59214cee459f63bddb5e516db01c16c4abe934e3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
10 years, 9 months