Compare commits
75 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f1df621f6 | ||
|
|
30079500a2 | ||
|
|
b40ba2c232 | ||
|
|
c182e9907c | ||
|
|
ccda24edbd | ||
| fe5e9df1b4 | |||
|
|
b6e7880860 | ||
|
be4bcec861 |
|||
|
|
c29489e7cd | ||
|
|
810d65931e | ||
| 09d024629f | |||
| 4ba9d18ab2 | |||
| 765ec660ef | |||
| 28a446966d | |||
| f525c36be4 | |||
|
|
3579ddc42a | ||
|
|
9810cc7673 | ||
|
|
958c723b12 | ||
|
|
561e4a0e84 | ||
|
|
454dac7f60 | ||
|
|
1ca531003e | ||
|
|
ccb9a73c2b | ||
|
|
bf94dbfa12 | ||
|
|
9b6362d5bb | ||
|
|
be412df1ff | ||
|
|
19694170da | ||
|
|
eda3f5b415 | ||
|
|
36ee23731c | ||
|
|
8267936503 | ||
|
|
9f1690ebc4 | ||
|
|
026071b741 | ||
|
|
1022f59047 | ||
|
|
a8caa5c684 | ||
|
|
556f2070ad | ||
|
|
0a19886087 | ||
|
|
dfa6381ab7 | ||
|
|
8da15110f5 | ||
|
|
194beb78d4 | ||
|
|
0df834649a | ||
| 1f7865337c | |||
|
|
bef30d0676 | ||
|
|
bffb143da2 | ||
|
|
427b5e468e | ||
|
|
ed1a10e3c8 | ||
|
|
abcc2f188e | ||
|
|
9c52fef553 | ||
|
|
8ed99246eb | ||
|
|
e4fea062a9 | ||
|
|
2e9e564cd3 | ||
|
|
49358b3055 | ||
|
|
f7ccd98b6e | ||
|
|
f41b6ad56e | ||
|
|
47cae72e9a | ||
|
|
1e2a95d3c3 | ||
|
|
1e0c1c2a5b | ||
|
|
ca6e46d4df | ||
|
|
bd475bad20 | ||
|
|
2b68010b9c | ||
|
|
e07e184375 | ||
|
|
7017ead39d | ||
|
|
088eb71d57 | ||
|
|
0375459d8f | ||
|
|
f9deeff504 | ||
|
|
13a767c472 | ||
|
|
3c7e810941 | ||
|
|
9a160b11f9 | ||
|
|
b745e44cd1 | ||
|
|
ec83ab33b2 | ||
|
|
234e9a34da | ||
|
|
798d9999cc | ||
|
|
0c53bf9d23 | ||
|
|
0e2b9140cd | ||
|
|
617a4420f1 | ||
|
|
8fc34a90c2 | ||
|
|
03249a2f5a |
11 changed files with 1 additions and 1913 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
/vdsm-*.tar.gz
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
From 6bfb990b3711631ea2cd13fac243d3de9587e1da Mon Sep 17 00:00:00 2001
|
||||
From: Dan Kenigsberg <danken@redhat.com>
|
||||
Date: Tue, 10 Sep 2013 09:15:49 +0100
|
||||
Subject: [PATCH] systemd init: no need to stop conflicting services
|
||||
|
||||
We use the explict systemd Conflicts= statement for that.
|
||||
|
||||
This patch is sent only to the ovirt-3.3 branch, as in master branch we
|
||||
already have an independent systemd service management.
|
||||
|
||||
Bug-Url: https://bugzilla.redhat.com/999664
|
||||
Change-Id: I7b5469ce61ae8aca353c2c7345a8a719ab0e898f
|
||||
Signed-off-by: Dan Kenigsberg <danken@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/19046
|
||||
Reviewed-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
|
||||
Reviewed-by: Yaniv Bronhaim <ybronhei@redhat.com>
|
||||
---
|
||||
vdsm/vdsmd.init.in | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
|
||||
index 56f07bd..b38791d 100755
|
||||
--- a/vdsm/vdsmd.init.in
|
||||
+++ b/vdsm/vdsmd.init.in
|
||||
@@ -186,7 +186,9 @@ start() {
|
||||
local ret_val
|
||||
"@PYTHON@" "@VDSMDIR@/hooks.pyc" before_vdsm_start
|
||||
|
||||
- shutdown_conflicting_srv
|
||||
+ if ! has_systemd; then
|
||||
+ shutdown_conflicting_srv
|
||||
+ fi
|
||||
|
||||
if ! "@LIBEXECDIR@/vdsm-gencerts.sh" --check; then
|
||||
printf $"Configuring a self-signed VDSM host certificate: "
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From cac71a74f4d4b91eac76be60c050632cfb2d9dba Mon Sep 17 00:00:00 2001
|
||||
From: Douglas Schilling Landgraf <dougsland@redhat.com>
|
||||
Date: Thu, 12 Sep 2013 11:52:04 -0400
|
||||
Subject: [PATCH] vdsmd.init: Add service-is-managed in
|
||||
shutdown_conflicting_srv
|
||||
|
||||
We should not throw a stack trace if a service does not exist
|
||||
|
||||
Change-Id: I8916a73c446ea2f296b66f5fcf133b07c2d7a66c
|
||||
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1006842
|
||||
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/19197
|
||||
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
|
||||
---
|
||||
vdsm/vdsmd.init.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
|
||||
index b38791d..482d2ec 100755
|
||||
--- a/vdsm/vdsmd.init.in
|
||||
+++ b/vdsm/vdsmd.init.in
|
||||
@@ -83,6 +83,7 @@ shutdown_conflicting_srv() {
|
||||
local srv
|
||||
|
||||
for srv in ${CONFLICTING_SERVICES}; do
|
||||
+ "$VDSM_TOOL" service-is-managed "$srv" >/dev/null 2>&1 || continue
|
||||
"$VDSM_TOOL" service-disable "$srv"
|
||||
if "$VDSM_TOOL" service-status "$srv" > /dev/null 2>&1; then
|
||||
if [ "$srv" = "libvirt-guests" ]; then
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
From 5751ff1a2390c0145d4c0f48345ab9b062afd648 Mon Sep 17 00:00:00 2001
|
||||
From: Federico Simoncelli <fsimonce@redhat.com>
|
||||
Date: Fri, 13 Sep 2013 11:07:46 -0400
|
||||
Subject: [PATCH] imageSharing: return proper size in httpGetSize
|
||||
|
||||
When importing images from OpenStack Glance the Content-Length is 0
|
||||
so we need to override the value with the content of the custom header
|
||||
X-Image-Meta-Size.
|
||||
|
||||
Change-Id: Icbcc601767d7f5b044b9e0e32f35abccdfb5746b
|
||||
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/19222
|
||||
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/19284
|
||||
---
|
||||
vdsm/storage/imageSharing.py | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/vdsm/storage/imageSharing.py b/vdsm/storage/imageSharing.py
|
||||
index 5db0a4e..26f299a 100644
|
||||
--- a/vdsm/storage/imageSharing.py
|
||||
+++ b/vdsm/storage/imageSharing.py
|
||||
@@ -29,11 +29,18 @@ def httpGetSize(methodArgs):
|
||||
headers = curlImgWrap.head(methodArgs.get('url'),
|
||||
methodArgs.get("headers", {}))
|
||||
|
||||
+ size = None
|
||||
+
|
||||
if 'Content-Length' in headers:
|
||||
size = int(headers['Content-Length'])
|
||||
- elif 'X-Image-Meta-Size' in headers:
|
||||
- size = int(headers['X-Image-Meta-Size'])
|
||||
- else:
|
||||
+
|
||||
+ # OpenStack Glance returns Content-Length = 0 so we need to
|
||||
+ # override the value with the content of the custom header
|
||||
+ # X-Image-Meta-Size.
|
||||
+ if 'X-Image-Meta-Size' in headers:
|
||||
+ size = max(size, int(headers['X-Image-Meta-Size']))
|
||||
+
|
||||
+ if size is None:
|
||||
raise RuntimeError("Unable to determine image size")
|
||||
|
||||
return size
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
From 61dbd7ff62551b368301de89cd72d541d36d9b8e Mon Sep 17 00:00:00 2001
|
||||
From: Dan Kenigsberg <danken@redhat.com>
|
||||
Date: Fri, 6 Sep 2013 20:25:59 +0100
|
||||
Subject: [PATCH] Require libvirt that allows vmUpdateDevice
|
||||
|
||||
Change-Id: I50b9af97887c2e00e87d34620153a82e28c2a310
|
||||
Bug-Url: https://bugzilla.redhat.com/1001001
|
||||
Signed-off-by: Dan Kenigsberg <danken@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/18937
|
||||
Reviewed-by: Antoni Segura Puimedon <asegurap@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/18950
|
||||
---
|
||||
vdsm.spec.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/vdsm.spec.in b/vdsm.spec.in
|
||||
index 74ad331..b4218a6 100644
|
||||
--- a/vdsm.spec.in
|
||||
+++ b/vdsm.spec.in
|
||||
@@ -117,7 +117,7 @@ Requires: libvirt-daemon-driver-nwfilter
|
||||
Requires: libvirt-daemon-driver-qemu
|
||||
%else
|
||||
%if 0%{?rhel}
|
||||
-Requires: libvirt >= 0.10.2-18.el6_4.4
|
||||
+Requires: libvirt >= 0.10.2-18.el6_4.10
|
||||
%else
|
||||
Requires: libvirt >= 1.0.2-1
|
||||
%endif
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From e5b3bc3b4c6e613e25988294ab3306b88deb061d Mon Sep 17 00:00:00 2001
|
||||
From: Dan Kenigsberg <danken@redhat.com>
|
||||
Date: Mon, 7 Oct 2013 01:46:54 +0100
|
||||
Subject: [PATCH] vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks
|
||||
|
||||
_getUnderlyingDriveInfo() is broken by design. It has no reliable means
|
||||
to match Engine-requested devices with libvirt-produced ones. As a
|
||||
heuristic, it uses the device's as matching key. However, before this
|
||||
patch, it failed to extract the path from the xml definition of gluster
|
||||
disks.
|
||||
|
||||
Bug-Url: https://bugzilla.redhat.com/1007980
|
||||
Change-Id: I4459916cab24d735c067a6eb7020d4f43505fc97
|
||||
Signed-off-by: Dan Kenigsberg <danken@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/19906
|
||||
Reviewed-by: Vinzenz Feenstra <vfeenstr@redhat.com>
|
||||
Reviewed-by: Michal Skrivanek <michal.skrivanek@redhat.com>
|
||||
Reviewed-by: Martin Polednik <mpoledni@redhat.com>
|
||||
Tested-by: Martin Polednik <mpoledni@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/19950
|
||||
---
|
||||
vdsm/vm.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/vdsm/vm.py b/vdsm/vm.py
|
||||
index f0690b7..662eacc 100644
|
||||
--- a/vdsm/vm.py
|
||||
+++ b/vdsm/vm.py
|
||||
@@ -4579,7 +4579,8 @@ class Vm(object):
|
||||
sources = x.getElementsByTagName('source')
|
||||
if sources:
|
||||
devPath = (sources[0].getAttribute('file') or
|
||||
- sources[0].getAttribute('dev'))
|
||||
+ sources[0].getAttribute('dev') or
|
||||
+ sources[0].getAttribute('name'))
|
||||
else:
|
||||
devPath = ''
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From e086b7a3d1de694d3335304442a3564c277acc30 Mon Sep 17 00:00:00 2001
|
||||
From: Yeela Kaplan <ykaplan@redhat.com>
|
||||
Date: Mon, 9 Sep 2013 11:04:39 +0200
|
||||
Subject: [PATCH] remoteFileHandler: Add create exclusive option for
|
||||
truncateFile
|
||||
|
||||
Change-Id: Idfeff348e0f6fc240954e7d304b794dd99ea098c
|
||||
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=979193
|
||||
Signed-off-by: Yeela Kaplan <ykaplan@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/19022
|
||||
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/20062
|
||||
Reviewed-by: Federico Simoncelli <fsimonce@redhat.com>
|
||||
Tested-by: Federico Simoncelli <fsimonce@redhat.com>
|
||||
---
|
||||
vdsm/storage/remoteFileHandler.py | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/vdsm/storage/remoteFileHandler.py b/vdsm/storage/remoteFileHandler.py
|
||||
index abe9915..47b237b 100644
|
||||
--- a/vdsm/storage/remoteFileHandler.py
|
||||
+++ b/vdsm/storage/remoteFileHandler.py
|
||||
@@ -334,8 +334,13 @@ def directWriteLines(path, lines):
|
||||
return f.writelines(lines)
|
||||
|
||||
|
||||
-def truncateFile(path, size, mode=None):
|
||||
- with open(path, "w") as f:
|
||||
+def truncateFile(path, size, mode=None, creatExcl=False):
|
||||
+ flags = os.O_CREAT | os.O_WRONLY
|
||||
+ if creatExcl:
|
||||
+ flags |= os.O_EXCL
|
||||
+
|
||||
+ fd = os.open(path, flags)
|
||||
+ with os.fdopen(fd, 'w') as f:
|
||||
if mode is not None:
|
||||
os.chmod(path, mode)
|
||||
f.truncate(size)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
From 22b94817d1647e2bfdce66a24d0c25ead47fdedc Mon Sep 17 00:00:00 2001
|
||||
From: Federico Simoncelli <fsimonce@redhat.com>
|
||||
Date: Wed, 9 Oct 2013 15:03:25 -0400
|
||||
Subject: [PATCH] oop: improve safety for truncateFile
|
||||
|
||||
In order to make truncateFile safer and to avoid any confusion on its
|
||||
behavior:
|
||||
|
||||
* a new comment has been added mentioning O_TRUNC and "w" to avoid any
|
||||
future mistake in this area
|
||||
* a new test has been added to check the expected outcomes
|
||||
* the "w" mode has been removed from truncateFile (used in os.fdopen)
|
||||
to prevent any future reconversion to open(path, "w")
|
||||
* the risk of a file descriptor leak (for a failing os.fdopen call)
|
||||
has been removed using the relevant posix calls
|
||||
|
||||
Change-Id: Ib71b53498c7bc4ea7a1ab725feb18bc5929f8c85
|
||||
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/20046
|
||||
Reviewed-by: Nir Soffer <nsoffer@redhat.com>
|
||||
Reviewed-by: Sergey Gotliv <sgotliv@redhat.com>
|
||||
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
|
||||
Reviewed-on: http://gerrit.ovirt.org/20063
|
||||
---
|
||||
tests/remoteFileHandlerTests.py | 28 ++++++++++++++++++++++++++++
|
||||
vdsm/storage/remoteFileHandler.py | 14 +++++++++++---
|
||||
2 files changed, 39 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/remoteFileHandlerTests.py b/tests/remoteFileHandlerTests.py
|
||||
index 544ec28..a2ca574 100644
|
||||
--- a/tests/remoteFileHandlerTests.py
|
||||
+++ b/tests/remoteFileHandlerTests.py
|
||||
@@ -18,6 +18,8 @@
|
||||
# Refer to the README and COPYING files for full details of the license
|
||||
#
|
||||
import os
|
||||
+import string
|
||||
+import tempfile
|
||||
from vdsm import utils
|
||||
|
||||
from testrunner import VdsmTestCase as TestCaseBase
|
||||
@@ -69,3 +71,29 @@ class PoolHandlerTests(TestCaseBase):
|
||||
test = lambda: self.assertFalse(os.path.exists(procPath))
|
||||
|
||||
utils.retry(test, AssertionError, timeout=4, sleep=0.1)
|
||||
+
|
||||
+
|
||||
+class RemoteFileHandlerFunctionTests(TestCaseBase):
|
||||
+ def testTruncateFile(self):
|
||||
+ fd, path = tempfile.mkstemp()
|
||||
+ try:
|
||||
+ os.write(fd, string.ascii_uppercase)
|
||||
+ os.close(fd)
|
||||
+
|
||||
+ # Verifying content
|
||||
+ data = string.ascii_uppercase
|
||||
+ self.assertEquals(data, file(path).read())
|
||||
+
|
||||
+ # Testing truncate to a larger size
|
||||
+ data = string.ascii_uppercase + chr(0) * 16
|
||||
+
|
||||
+ rhandler.truncateFile(path, len(data))
|
||||
+ self.assertEquals(data, file(path).read())
|
||||
+
|
||||
+ # Testing truncate to a smaller size
|
||||
+ data = string.ascii_uppercase
|
||||
+
|
||||
+ rhandler.truncateFile(path, len(data))
|
||||
+ self.assertEquals(data, file(path).read())
|
||||
+ finally:
|
||||
+ os.unlink(path)
|
||||
diff --git a/vdsm/storage/remoteFileHandler.py b/vdsm/storage/remoteFileHandler.py
|
||||
index 47b237b..3a22bc4 100644
|
||||
--- a/vdsm/storage/remoteFileHandler.py
|
||||
+++ b/vdsm/storage/remoteFileHandler.py
|
||||
@@ -335,15 +335,23 @@ def directWriteLines(path, lines):
|
||||
|
||||
|
||||
def truncateFile(path, size, mode=None, creatExcl=False):
|
||||
+ # NOTE: Under no circumstance you should add the O_TRUNC
|
||||
+ # flag here. We rely on the fact that the file content is
|
||||
+ # not deleted when truncating to a larger size.
|
||||
+ # Please also note that the "w" option used in open/file
|
||||
+ # contains O_TRUNC and therefore should not be used here.
|
||||
flags = os.O_CREAT | os.O_WRONLY
|
||||
+
|
||||
if creatExcl:
|
||||
flags |= os.O_EXCL
|
||||
|
||||
fd = os.open(path, flags)
|
||||
- with os.fdopen(fd, 'w') as f:
|
||||
+ try:
|
||||
if mode is not None:
|
||||
- os.chmod(path, mode)
|
||||
- f.truncate(size)
|
||||
+ os.fchmod(fd, mode)
|
||||
+ os.ftruncate(fd, size)
|
||||
+ finally:
|
||||
+ os.close(fd)
|
||||
|
||||
|
||||
def readLines(path):
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
1
dead.package
Normal file
1
dead.package
Normal file
|
|
@ -0,0 +1 @@
|
|||
vdsm fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1676186
|
||||
1
sources
1
sources
|
|
@ -1 +0,0 @@
|
|||
6b09314cd4aa11b102ea6187f1dcbd4f vdsm-4.12.1.tar.gz
|
||||
Reference in a new issue