Change in vdsm[master]: image: placeholder optimization on preallocation
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: image: placeholder optimization on preallocation
......................................................................
image: placeholder optimization on preallocation
When the destination of a copy or move command is an NFS domain
we should try to optimize the placeholders creation avoiding
unnecessary prezeroing (only relevant case: RAW PREALLOCATED).
In such case in the past we were using a TEMPORARY_VOLUME_SIZE
to create a placeholder with a temporary size of 10Mb.
This is interfering with live storage migration as the following
volumes in the chain are inheriting the temporary size inside the
qcow header (virtual disk size).
With this patch we are instead forcing the creation of the volume
as SPARSE as this won't have any side effect on the qcow header.
Change-Id: I32811bd45320ef02bfc593a71dfdafc0b0550c7d
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=910445
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/blockSD.py
M vdsm/storage/image.py
M vdsm/storage/sd.py
3 files changed, 30 insertions(+), 12 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/12692/1
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 9809bf4..e040596 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -431,6 +431,14 @@
def requiresMailbox(self):
return True
+ @property
+ def lightweightPreallocation(self):
+ """
+ This property advertises whether creating preallocated volumes
+ is a lightweight operation or not.
+ """
+ return True
+
def _registerResourceNamespaces(self):
"""
Register resources namespaces and create
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index 92021ff..1b6f89d 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -523,18 +523,20 @@
# find out src volume parameters
volParams = srcVol.getVolumeParams(bs=1)
- # To avoid 'prezeroing' preallocated volume on NFS domain,
- # we create the target volume with minimal size and after
- # that w'll change its metadata back to the original size.
- if (volParams['volFormat'] == volume.COW_FORMAT
- or volParams['prealloc'] == volume.SPARSE_VOL):
- volTmpSize = volParams['size']
+ # To avoid prezeroing preallocated volumes on NFS domains
+ # we create the target as a sparse volume (since it will be
+ # soon filled with the data coming from the copy) and then
+ # we change its metadata back to the original value.
+ if (volParams['prealloc'] == volume.PREALLOCATED_VOL
+ and not destDom.lightweightPreallocation):
+ tmpVolPreallocation = volume.SPARSE_VOL
else:
- volTmpSize = TEMPORARY_VOLUME_SIZE # in sectors (10M)
+ tmpVolPreallocation = volParams['prealloc']
- destDom.createVolume(imgUUID=imgUUID, size=volTmpSize,
+ destDom.createVolume(imgUUID=imgUUID,
+ size=volParams['size'],
volFormat=volParams['volFormat'],
- preallocate=volParams['prealloc'],
+ preallocate=tmpVolPreallocation,
diskType=volParams['disktype'],
volUUID=srcVol.volUUID,
desc=volParams['descr'],
@@ -548,9 +550,9 @@
dstVol.extend((volParams['apparentsize'] + 511) / 512)
# Change destination volume metadata back to the original
- # size.
- if volTmpSize != volParams['size']:
- dstVol.setSize(volParams['size'])
+ # type.
+ if tmpVolPreallocation != volParams['prealloc']:
+ dstVol.setType(volParams['prealloc'])
dstChain.append(dstVol)
except se.StorageException:
diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py
index 9ce836b..7006a88 100644
--- a/vdsm/storage/sd.py
+++ b/vdsm/storage/sd.py
@@ -316,6 +316,14 @@
return False
@property
+ def lightweightPreallocation(self):
+ """
+ This property advertises whether creating preallocated volumes
+ is a lightweight operation or not.
+ """
+ return False
+
+ @property
def oop(self):
return oop.getProcessPool(self.sdUUID)
--
To view, visit http://gerrit.ovirt.org/12692
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I32811bd45320ef02bfc593a71dfdafc0b0550c7d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: vdsm.spec.in: fix req for glusterfs and f19
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: vdsm.spec.in: fix req for glusterfs and f19
......................................................................
vdsm.spec.in: fix req for glusterfs and f19
F19 doesn't have a 3.4.0 build yet.
Koji system keep sharing that vdsm has broken dependencies
for glusterfs. This patch will temporary move glusterfs 3.4.0
requirement for F20.
Change-Id: I87bd79bc732ae6a5638ac9357d0bf73b1b70e5b6
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/13339/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 3f7397a..ccb5c5d 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -458,7 +458,11 @@
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
+%if 0%{?fedora} > 19
Requires: glusterfs >= 3.4.0
+%else
+Requires: glusterfs = 3.3.1
+%endif
Requires: glusterfs-server
Requires: glusterfs-fuse
Requires: glusterfs-rdma
--
To view, visit http://gerrit.ovirt.org/13339
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I87bd79bc732ae6a5638ac9357d0bf73b1b70e5b6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: vdsm-logrotate: change rotate to 10
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: vdsm-logrotate: change rotate to 10
......................................................................
vdsm-logrotate: change rotate to 10
Logrotate compress VDSM logs (/var/log/vdsm/*) when they achieve >15M.
However, we rotates the logs only when it reaches 100 count.
This patch purpose the rotation to 10 counts because very old logs
cannot help to get out of trouble anyway. Also, reduce the number of
files/space in the partition.
Rotating 10 files compressed seems reasonable/safe.
Change-Id: Ia28d84c455d0a2719855a33fc6861b4a74317fd0
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=928217
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm/vdsm-logrotate.conf.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/13500/1
diff --git a/vdsm/vdsm-logrotate.conf.in b/vdsm/vdsm-logrotate.conf.in
index ce71015..4b270fb 100644
--- a/vdsm/vdsm-logrotate.conf.in
+++ b/vdsm/vdsm-logrotate.conf.in
@@ -1,5 +1,5 @@
/var/log/vdsm/*.log {
- rotate 100
+ rotate 10
missingok
size 15M
compress
--
To view, visit http://gerrit.ovirt.org/13500
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia28d84c455d0a2719855a33fc6861b4a74317fd0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
9 years, 12 months
Change in vdsm[master]: trivial: Use os.uname to get kernel version insteaf of readi...
by wudxw@linux.vnet.ibm.com
Mark Wu has uploaded a new change for review.
Change subject: trivial: Use os.uname to get kernel version insteaf of reading proc files
......................................................................
trivial: Use os.uname to get kernel version insteaf of reading proc files
Change-Id: I0bcb4326d6ce4a41486352e11683c83879b61887
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M vdsm/caps.py
1 file changed, 6 insertions(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/12874/1
diff --git a/vdsm/caps.py b/vdsm/caps.py
index 38e47be..613de0c 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -312,18 +312,13 @@
def _getKeyPackages():
def kernelDict():
try:
- with open('/proc/sys/kernel/osrelease', "r") as f:
- ver, rel = f.read().strip().split('-', 1)
+ ret = os.uname()
+ ver, rel = ret[2].split('-', 1)
+ t = time.mktime(time.strptime(' '.join(ret[3].split()[2:]),
+ "%a %b %d %H:%M:%S %Z %Y"))
except:
- logging.error('kernel release not found', exc_info=True)
- ver, rel = '0', '0'
- try:
- t = file('/proc/sys/kernel/version').read().split()[2:]
- del t[4] # Delete timezone
- t = time.mktime(time.strptime(' '.join(t)))
- except:
- logging.error('kernel build time not found', exc_info=True)
- t = '0'
+ ver, rel, t = '0', '0', '0'
+ logging.error('kernel version not found', exc_info=True)
return dict(version=ver, release=rel, buildtime=t)
pkgs = {'kernel': kernelDict()}
--
To view, visit http://gerrit.ovirt.org/12874
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bcb4326d6ce4a41486352e11683c83879b61887
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
9 years, 12 months
Change in vdsm[master]: vdsm.spec: remove sed software_version/revision
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: vdsm.spec: remove sed software_version/revision
......................................................................
vdsm.spec: remove sed software_version/revision
VDSM should report the full version/revision.
Revert commit 23a0c7199371a8f6b767b8f49c87da11b466d7da
Change-Id: I44b6a28e378c4090595e823588dbbe583a38a353
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893193
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm.spec.in
M vdsm/dsaversion.py.in
2 files changed, 0 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/52/12952/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index ed71ab9..d5d2b16 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -450,11 +450,6 @@
%endif
%configure %{?with_hooks:--enable-hooks}
make
-# Setting software_version and software_revision in dsaversion.py
-baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'`
-baseversion=`echo "%{version}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'`
-sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \
- -e 's/^software_revision =.*/software_revision = "'"${baserelease}"'"/' vdsm/dsaversion.py
%install
rm -rf %{buildroot}
diff --git a/vdsm/dsaversion.py.in b/vdsm/dsaversion.py.in
index d0160fc..a71953e 100644
--- a/vdsm/dsaversion.py.in
+++ b/vdsm/dsaversion.py.in
@@ -23,8 +23,6 @@
python based components
"""
version_name = "Snow Man"
-# FIXME: As soon as we can provide a long version/release to oVirt-Engine
-# remove from vdsm.spec the sed to replace the below macros
software_version = "@PACKAGE_VERSION@"
software_revision = "@PACKAGE_RELEASE@"
--
To view, visit http://gerrit.ovirt.org/12952
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I44b6a28e378c4090595e823588dbbe583a38a353
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
9 years, 12 months