Change in vdsm[master]: netwiring: [1/4] Extend vmInterfaceDevice API def
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: netwiring: [1/4] Extend vmInterfaceDevice API def
......................................................................
netwiring: [1/4] Extend vmInterfaceDevice API def
This patch extends the definitions of vmInterfaceDevice in
order to allow vmHotplugNic and vmCreate to set a vnic link
status as well as set portMirroring for it.
Change-Id: I4ef8ad6963682a38d5f65d718e5b2a465ef3af82
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M vdsm_api/vdsmapi-schema.json
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/9599/1
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 843cbc7..2c02804 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -1980,6 +1980,11 @@
#
# @specParams: #optional Additional device parameters
#
+# @linkActive: #optional Whether the VM network card has its link active (up)
+# or not (down). If omitted, the link will be active
+# @portMirroring: #optional If present, indicates the traffic of which networks
+# should be mirrored to the interface.
+#
# Since: 4.10.0
##
{'type': 'VmInterfaceDevice',
@@ -1987,7 +1992,8 @@
'nicModel': 'VmInterfaceDeviceModel', 'macAddr': 'str',
'network': 'str', '*bootOrder': 'uint',
'address': 'VmDeviceAddress', 'alias': 'str', 'deviceId': 'UUID',
- '*specParams': 'VmInterfaceDeviceSpecParams'}}
+ '*specParams': 'VmInterfaceDeviceSpecParams', '*linkActive': 'bool',
+ '*portMirroring': ['str']}}
##
# @VmVideoDeviceType:
--
To view, visit http://gerrit.ovirt.org/9599
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ef8ad6963682a38d5f65d718e5b2a465ef3af82
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
11 years, 5 months
Change in vdsm[master]: vdsm.spec: Move mom requirement to Fedora condition
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: vdsm.spec: Move mom requirement to Fedora condition
......................................................................
vdsm.spec: Move mom requirement to Fedora condition
Mom requirement is based on oVirt 3.2, let's move it
to Fedora packages requirements at this moment.
Change-Id: Ib4788b4fcac2e8354422a5b57038046538fd97d9
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/9515/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index eebe535..bb122fa 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -120,6 +120,7 @@
Requires: sed >= 4.2.1-10
Requires: selinux-policy-targeted >= 3.10.0-149
Requires: lvm2 >= 2.02.95
+Requires: mom >= 0.3.0
%endif
Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client
@@ -134,7 +135,6 @@
Requires: libselinux-python
Requires: %{name}-python = %{version}-%{release}
Requires: pyparted
-Requires: mom >= 0.3.0
Requires(pre,preun): policycoreutils-python
Requires(post): /usr/sbin/saslpasswd2
--
To view, visit http://gerrit.ovirt.org/9515
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4788b4fcac2e8354422a5b57038046538fd97d9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
11 years, 5 months
Change in vdsm[master]: upgrade: reallocate the metadata slots when needed
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: upgrade: reallocate the metadata slots when needed
......................................................................
upgrade: reallocate the metadata slots when needed
Change-Id: I15b6a85969a10b5e2b852031fc510aabcc2d5276
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/imageRepository/formatConverter.py
1 file changed, 28 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/9660/1
diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py
index cd32a62..175f943 100644
--- a/vdsm/storage/imageRepository/formatConverter.py
+++ b/vdsm/storage/imageRepository/formatConverter.py
@@ -29,6 +29,9 @@
from storage import volume
+BLKVOL_MAX_OFFSET = sd.LEASES_SIZE - blockVolume.RESERVED_LEASES - 1
+
+
def __convertDomainMetadataToTags(domain, targetVersion):
log = logging.getLogger('Storage.DomainMetadataToTags')
@@ -131,11 +134,31 @@
# see volume.setrw for more details.
vol._setrw(True)
+ def v3ReallocateMetadataSlot(domain, vol):
+ metaOffset = vol.getMetaOffset()
+
+ if metaOffset < BLKVOL_MAX_OFFSET:
+ return
+
+ log.debug("Reallocating metadata slot for volume %s", vol.volUUID)
+ newMetaOffset = domain.getFreeMetadataSlot()
+
+ metaContent = vol.getMetadata()
+ log.debug("Copying the metadata for volume %s to the new slot %s",
+ vol.volUUID, newMetaOffset)
+ vol.createMetadata((domain.sdUUID, newMetaOffset), metaContent)
+
+ log.debug("Switching the metadata slot for volume %s to %s",
+ vol.volUUID, newMetaOffset)
+ vol.changeVolumeTag(TAG_PREFIX_MD, newMetaOffset);
+
try:
if isMsd:
log.debug("Acquiring the cluster lock for domain %s with "
"host id: %s", domain.sdUUID, hostId)
newClusterLock.acquire(hostId)
+
+ isBlockDomain = domain.getStorageType() in sd.BLOCK_DOMAIN_TYPES
allVolumes = domain.getAllVolumes()
allImages = set()
@@ -149,6 +172,10 @@
# The first imgUUID is the imgUUID of the template or the
# only imgUUID where the volUUID appears.
vol = domain.produceVolume(imgUUIDs[0], volUUID)
+
+ if isBlockDomain:
+ v3ReallocateMetadataSlot(domain, vol)
+
v3UpgradeVolumePermissions(vol)
log.debug("Creating the volume lease for %s", volUUID)
@@ -214,8 +241,7 @@
"version %s for domain %s", currentVersion, targetVersion,
domain.sdUUID)
- if (currentVersion not in blockSD.VERS_METADATA_TAG
- and domain.getStorageType() in sd.BLOCK_DOMAIN_TYPES):
+ if (isBlockDomain and currentVersion not in blockSD.VERS_METADATA_TAG):
__convertDomainMetadataToTags(domain, targetVersion)
else:
domain.setMetaParam(sd.DMDK_VERSION, targetVersion)
--
To view, visit http://gerrit.ovirt.org/9660
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I15b6a85969a10b5e2b852031fc510aabcc2d5276
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
11 years, 5 months
Change in vdsm[master]: sdcache: add refresh to connectStoragePool
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: sdcache: add refresh to connectStoragePool
......................................................................
sdcache: add refresh to connectStoragePool
Change-Id: I2d3adcff7bb0e97be5c797cd720c6353920d9db0
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/9422/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index ac5e1db..2577db7 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -640,6 +640,7 @@
self.scsiKey = scsiKey
# Make sure SDCache doesn't have stale data (it can be in case of FC)
sdCache.invalidateStorage()
+ sdCache.refresh()
# Rebuild whole Pool
self.__rebuild(msdUUID=msdUUID, masterVersion=masterVersion)
self.__createMailboxMonitor()
--
To view, visit http://gerrit.ovirt.org/9422
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d3adcff7bb0e97be5c797cd720c6353920d9db0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
11 years, 5 months
Change in vdsm[master]: pep8: comply with E122 and E123
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: pep8: comply with E122 and E123
......................................................................
pep8: comply with E122 and E123
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Change-Id: Iaa9dffbe1cc1c137430ec30148694e01750260a6
---
M Makefile.am
M tests/configNetworkTests.py
M vdsm/storage/blockSD.py
M vdsm/storage/fileSD.py
M vdsm/storage/iscsi.py
M vdsm/storage/multipath.py
M vdsm/storage/sd.py
M vdsm/storage/sp.py
M vdsm/storage/storageServer.py
M vdsm/storage/storage_exception.py
M vdsm_api/process-schema.py
M vdsm_reg/define.py
12 files changed, 25 insertions(+), 26 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/30/9730/1
diff --git a/Makefile.am b/Makefile.am
index 11f0597..434aa41 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -104,7 +104,7 @@
find . -path './.git' -prune -type f -o \
-name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES)
$(PEP8) --exclude="$(PEP8_BLACKLIST)" --filename '*.py,*.py.in' \
- --ignore=E122,E123,E124,E125,E126,E127,E128,E241 \
+ --ignore=E124,E125,E126,E127,E128,E241 \
$(PEP8_WHITELIST)
@if test -f .gitignore; then \
for i in `git ls-files \*.in`; do \
diff --git a/tests/configNetworkTests.py b/tests/configNetworkTests.py
index cc88184..0813ebc 100644
--- a/tests/configNetworkTests.py
+++ b/tests/configNetworkTests.py
@@ -175,8 +175,7 @@
opts), None)
def _fakeNetworks():
- return {
- 'fakebridgenet': {'iface': 'fakebridge', 'bridged': True},
+ return {'fakebridgenet': {'iface': 'fakebridge', 'bridged': True},
'fakenet': {'iface': 'fakeint', 'bridged': False},
}
@@ -199,29 +198,29 @@
'fakebrnet2': {'iface': 'fakebr2', 'bridged': True,
'ports': ['eth7.1']},
'fakebrnet3': {'iface': 'eth8', 'bridged': False}
- },
+ },
'vlans': {
'eth3.2': {
'iface': 'eth3',
'addr': '10.10.10.10',
'netmask': '255.255.0.0',
'mtu': 1500
- },
+ },
'eth7.1': {
'iface': 'eth7',
'addr': '192.168.100.1',
'netmask': '255.255.255.0',
'mtu': 1500
- }
- },
+ }
+ },
'nics': ['eth0', 'eth1', 'eth2', 'eth3', 'eth4', 'eth5',
'eth6', 'eth7', 'eth8', 'eth9', 'eth10'],
'bondings': {
'bond00': {
'slaves': ['eth5', 'eth6']
- }
}
}
+ }
netinfoIns = netinfo.NetInfo(_netinfo)
vlan = bonding = ipaddr = netmask = gw = bondingOptions = None
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 141754c..a5ed756 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -549,7 +549,7 @@
DMDK_VGUUID: vgUUID,
DMDK_LOGBLKSIZE: logBlkSize,
DMDK_PHYBLKSIZE: phyBlkSize,
- }
+ }
initialMetadata.update(mapping)
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index c4415da..fde466f 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -200,7 +200,7 @@
sd.DMDK_LEASE_RETRIES:
sd.DEFAULT_LEASE_PARAMS[sd.DMDK_LEASE_RETRIES],
REMOTE_PATH: remotePath
- })
+ })
def getReadDelay(self):
t = time.time()
diff --git a/vdsm/storage/iscsi.py b/vdsm/storage/iscsi.py
index ac4d7f6..a7e320d 100644
--- a/vdsm/storage/iscsi.py
+++ b/vdsm/storage/iscsi.py
@@ -255,7 +255,7 @@
'hardwareAddress': ("iface.hwaddress", 'rw'),
'ipAddress': ('iface.ipaddress', 'rw'),
'initiatorName': ('iface.initiatorname', 'rw')
- }
+ }
def __getattr__(self, name):
if name in ("_conf", "_fields", "_loaded"):
diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py
index c43cb09..adaa0c0 100644
--- a/vdsm/storage/multipath.py
+++ b/vdsm/storage/multipath.py
@@ -246,7 +246,7 @@
"fwrev": "",
"logicalblocksize": "",
"physicalblocksize": "",
- }
+ }
for slave in devicemapper.getSlaves(dmId):
if not devicemapper.isBlockDevice(slave):
@@ -310,7 +310,7 @@
"iqn": sess.target.iqn,
"portal": str(sess.target.tpgt),
"initiatorname": sess.iface.name
- }
+ }
# Note that credentials must be sent back in order for
# the engine to tell vdsm how to reconnect later
diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py
index 875d4b1..2d53a70 100644
--- a/vdsm/storage/sd.py
+++ b/vdsm/storage/sd.py
@@ -283,7 +283,7 @@
lambda val: intOrDefault(
DEFAULT_LEASE_PARAMS[DMDK_LEASE_RETRIES], val),
intEncode),
- }
+}
class StorageDomain:
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 98260dc..0c6fa39 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -93,7 +93,7 @@
PMDK_LVER: (int, str),
PMDK_SPM_ID: (int, str),
PMDK_MASTER_VER: (int, str)
- }
+}
# Calculate how many domains can be in the pool before overflowing the Metadata
MAX_DOMAINS = blockSD.SD_METADATA_SIZE - blockSD.METADATA_BASE_SIZE
@@ -713,11 +713,11 @@
raise se.UnicodeArgumentException()
futurePoolMD.update({
- PMDK_SPM_ID: SPM_ID_FREE,
- PMDK_LVER: LVER_INVALID,
- PMDK_MASTER_VER: masterVersion,
- PMDK_POOL_DESCRIPTION: poolName,
- PMDK_DOMAINS: {domain.sdUUID: sd.DOM_ACTIVE_STATUS}})
+ PMDK_SPM_ID: SPM_ID_FREE,
+ PMDK_LVER: LVER_INVALID,
+ PMDK_MASTER_VER: masterVersion,
+ PMDK_POOL_DESCRIPTION: poolName,
+ PMDK_DOMAINS: {domain.sdUUID: sd.DOM_ACTIVE_STATUS}})
@unsecured
def reconstructMaster(self, hostId, poolName, msdUUID, domDict,
@@ -1362,7 +1362,7 @@
'lastCheck': '%.1f' % (now - st.lastCheck),
'delay': str(st.readDelay),
'valid': (st.error is None)
- },
+ },
'disktotal': disktotal,
'diskfree': diskfree,
@@ -1374,8 +1374,8 @@
'masterValidate': {
'mount': st.masterMounted,
'valid': st.masterValid
- }
}
+ }
return res
@unsecured
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index 383e04c..b457d5b 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -580,7 +580,7 @@
"posixfs": MountConnection,
"iscsi": IscsiConnection,
"localfs": LocalDirectoryConnection,
- }
+ }
@classmethod
def createConnection(cls, conInfo):
diff --git a/vdsm/storage/storage_exception.py b/vdsm/storage/storage_exception.py
index 71c5431..4a80e78 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -37,7 +37,7 @@
GENERAL_EXCEPTION = lambda e: (100, str(e))
ERROR_MAP = {
SecureError: SPM_STATUS_ERROR
- }
+}
def generateResponse(error, default=GENERAL_EXCEPTION):
diff --git a/vdsm_api/process-schema.py b/vdsm_api/process-schema.py
index ae63f44..8244995 100755
--- a/vdsm_api/process-schema.py
+++ b/vdsm_api/process-schema.py
@@ -29,7 +29,7 @@
"'": "'",
">": ">",
"<": "<",
- }
+}
# Symbols of these types are considered data types
typeKinds = ('class', 'type', 'enum', 'map', 'union', 'alias')
diff --git a/vdsm_reg/define.py b/vdsm_reg/define.py
index c665634..707adae 100644
--- a/vdsm_reg/define.py
+++ b/vdsm_reg/define.py
@@ -93,7 +93,7 @@
'Vds not operational. '
'Check logs, repair it, and restart'}},
'tmp': {}
- }
+}
doneCode = {'code': 0, 'message': 'Done'}
nullCode = {'code': 0, 'message': ''}
--
To view, visit http://gerrit.ovirt.org/9730
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa9dffbe1cc1c137430ec30148694e01750260a6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years, 5 months
Change in vdsm[master]: Sometimes the test host is overloaded and that might cause a...
by smizrahi@redhat.com
Saggi Mizrahi has uploaded a new change for review.
Change subject: Sometimes the test host is overloaded and that might cause a false positive with such a low timeout
......................................................................
Sometimes the test host is overloaded and that might cause a false positive with such a low timeout
Change-Id: Ibf80dfc8432b30967cd223460747095dc829878a
Signed-off-by: Saggi Mizrahi <smizrahi(a)redhat.com>
---
M tests/remoteFileHandlerTests.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/51/9751/1
diff --git a/tests/remoteFileHandlerTests.py b/tests/remoteFileHandlerTests.py
index 9508536..b114abf 100644
--- a/tests/remoteFileHandlerTests.py
+++ b/tests/remoteFileHandlerTests.py
@@ -38,7 +38,7 @@
And wash it down with a cup of hot steaming rules. Eh?."""
# (C) BBC - The Mighty Boosh
- self.assertEquals(self.pool.callCrabRPCFunction(1, "echo", data), data)
+ self.assertEquals(self.pool.callCrabRPCFunction(5, "echo", data), data)
def testTimeout(self):
sleep = 5
--
To view, visit http://gerrit.ovirt.org/9751
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf80dfc8432b30967cd223460747095dc829878a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
11 years, 5 months
Change in vdsm[master]: miscTests: Use /var/tmp for O_DIRECT tests
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: miscTests: Use /var/tmp for O_DIRECT tests
......................................................................
miscTests: Use /var/tmp for O_DIRECT tests
Fedora 18 uses tmpfs for /tmp, which causes our tests with
dd if=/tmp/bla iflag=direct
to fail. This patch uses /var/tmp which usually supports O_DIRECT.
This is a less intrussive way to fix the tests without touching
vdsm-proper, as suggested in http://gerrit.ovirt.org/9661 .
Change-Id: Ia9c58ee86138777ea6059be3aee25c92dd8ec9c7
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/miscTests.py
1 file changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/9727/1
diff --git a/tests/miscTests.py b/tests/miscTests.py
index 4c986ed..61e3af3 100644
--- a/tests/miscTests.py
+++ b/tests/miscTests.py
@@ -49,6 +49,7 @@
SUDO_USER = "root"
SUDO_GROUP = "root"
+TMPDIR = '/var/tmp'
def ddWatchCopy(srcPath, dstPath, callback, dataLen):
rc, out, err = misc.ddWatchCopy(srcPath, dstPath, callback, dataLen)
@@ -439,7 +440,7 @@
if (len(data) % 512) == 0:
data += "!"
- srcFd, srcPath = tempfile.mkstemp()
+ srcFd, srcPath = tempfile.mkstemp(dir=TMPDIR)
f = os.fdopen(srcFd, "wb")
f.write(data)
f.flush()
@@ -447,7 +448,7 @@
os.chmod(srcPath, 0666)
#Get a tempfilename
- dstFd, dstPath = tempfile.mkstemp()
+ dstFd, dstPath = tempfile.mkstemp(dir=TMPDIR)
os.chmod(dstPath, 0666)
#Copy
@@ -478,7 +479,7 @@
# Makes sure we round up to a complete block size
data *= 512
- srcFd, srcPath = tempfile.mkstemp()
+ srcFd, srcPath = tempfile.mkstemp(dir=TMPDIR)
f = os.fdopen(srcFd, "wb")
f.write(data)
f.flush()
@@ -486,7 +487,7 @@
os.chmod(srcPath, 0666)
#Get a tempfilename
- dstFd, dstPath = tempfile.mkstemp()
+ dstFd, dstPath = tempfile.mkstemp(dir=TMPDIR)
os.chmod(dstPath, 0666)
#Copy
@@ -508,7 +509,7 @@
exception.
"""
#Get a tempfilename
- srcFd, srcPath = tempfile.mkstemp()
+ srcFd, srcPath = tempfile.mkstemp(dir=TMPDIR)
os.unlink(srcPath)
#Copy
@@ -520,7 +521,7 @@
Test that stop really stops the copying process.
"""
try:
- with tempfile.NamedTemporaryFile() as f:
+ with tempfile.NamedTemporaryFile(dir=TMPDIR) as f:
ddWatchCopy("/dev/zero", f.name, lambda: True, 100)
except misc.se.ActionStopped:
self.log.info("Looks like stopped!")
--
To view, visit http://gerrit.ovirt.org/9727
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9c58ee86138777ea6059be3aee25c92dd8ec9c7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years, 5 months
Change in vdsm[master]: dd: use iflag=direct only when supported by the os
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: dd: use iflag=direct only when supported by the os
......................................................................
dd: use iflag=direct only when supported by the os
Much like as vdsm's use of fileUtils.DirectFile that was fixed in
http://gerrit.ovirt.org/9595, we should not pass the "direct" flag to
/bin/dd when the underlying filesystem does not support it.
Change-Id: I76f3ac6a9c220e34f78d0d922145bca56ee8e10e
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/storage/fileUtils.py
M vdsm/storage/misc.py
2 files changed, 24 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/9661/1
diff --git a/vdsm/storage/fileUtils.py b/vdsm/storage/fileUtils.py
index e00a004..2bc2cac 100644
--- a/vdsm/storage/fileUtils.py
+++ b/vdsm/storage/fileUtils.py
@@ -238,6 +238,13 @@
return open(path, mode)
+def pathSupportsDirectFile(path):
+ # Memory-only file systems don't support direct IO because direct IO
+ # means "skip the page cache" and they are 100% page cahce.
+ vfstype = mount.findMountOfPath(path).getRecord().fs_vfstype
+ return vfstype not in ["tmpfs", "ramfs"]
+
+
class DirectFile(object):
def __init__(self, path, mode):
if not "d" in mode:
@@ -247,13 +254,10 @@
raise ValueError("Invalid mode parameter")
self._writable = True
- # Memory only file systems don't support direct IO because direct IO
- # means "skip the page cache" and they are 100% page cahce.
- vfstype = mount.findMountOfPath(path).getRecord().fs_vfstype
- if vfstype in ["tmpfs", "ramfs"]:
- flags = 0
- else:
+ if pathSupportsDirectFile(path):
flags = os.O_DIRECT
+ else:
+ flags = 0
if "r" in mode:
if "+" in mode:
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index 6360dcf..d85fb66 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -58,6 +58,7 @@
from vdsm import constants
import storage_exception as se
from vdsm.betterPopen import BetterPopen
+import fileUtils
import logUtils
@@ -272,7 +273,12 @@
"""
Read the content of the file using /bin/dd command
"""
- cmd = [constants.EXT_DD, "iflag=%s" % DIRECTFLAG, "if=%s" % name]
+ cmd = [constants.EXT_DD]
+
+ if fileUtils.pathSupportsDirectFile(name):
+ cmd.append("iflag=%s" % DIRECTFLAG)
+ cmd.append("if=%s" % name)
+
if buffersize:
cmd.extend(["bs=%d" % buffersize, "count=1"])
(rc, out, err) = execCmd(cmd, sudo=False)
@@ -297,8 +303,11 @@
while left > 0:
(iounit, count, iooffset) = _alignData(left, offset)
- cmd = [constants.EXT_DD, "iflag=%s" % DIRECTFLAG, "skip=%d" % iooffset,
- "bs=%d" % iounit, "if=%s" % name, 'count=%s' % count]
+ cmd = [constants.EXT_DD]
+ if fileUtils.pathSupportsDirectFile(name):
+ cmd.append("iflag=%s" % DIRECTFLAG)
+ cmd.extend(["skip=%d" % iooffset, "bs=%d" % iounit, "if=%s" % name,
+ "count=%s" % count])
(rc, out, err) = execCmd(cmd, raw=True)
if rc:
@@ -381,7 +390,8 @@
oflag = None
conv = "notrunc"
if (iounit % 512) == 0:
- oflag = DIRECTFLAG
+ if fileUtils.pathSupportsDirectFile(dst):
+ oflag = DIRECTFLAG
else:
conv += ",%s" % DATASYNCFLAG
--
To view, visit http://gerrit.ovirt.org/9661
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I76f3ac6a9c220e34f78d0d922145bca56ee8e10e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years, 5 months
Change in vdsm[master]: vm: increase the volume extension on storage migration
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: vm: increase the volume extension on storage migration
......................................................................
vm: increase the volume extension on storage migration
During live migration VDSM needs to subsequently extend two volumes
instead of one; doubling the size of the chunk to extend the watermark
limit is doubled and VDSM has more time to accomplish the operations.
Change-Id: Ib61375613712feb7118a80c50b73e678d257f251
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/libvirtvm.py
M vdsm/vm.py
2 files changed, 15 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/9200/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index ca31a43..5f525bf 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -108,7 +108,7 @@
capacity, alloc, physical = \
self._vm._dom.blockInfo(vmDrive.path, 0)
- if physical - alloc >= self._vm._MIN_DISK_REMAIN:
+ if physical - alloc >= vmDrive.watermarkLimit:
continue
self._log.info('%s/%s apparent: %s capacity: %s, alloc: %s, '
@@ -1024,6 +1024,9 @@
class Drive(LibvirtVmDevice):
+ VOLWM_CHUNK_MB = config.getint('irs', 'volume_utilization_chunk_mb')
+ VOLWM_FREE_PCT = 100 - config.getint('irs', 'volume_utilization_percent')
+ VOLWM_CHUNK_LSM_MULT = 2 # Chunk multiplier during live storage migration
def __init__(self, conf, log, **kwargs):
if not kwargs.get('serial'):
@@ -1041,6 +1044,16 @@
self._blockDev = None
self._customize()
+
+ @property
+ def volExtensionChunk(self):
+ if hasattr(self, "diskReplicate"):
+ return self.VOLWM_CHUNK_MB * self.VOLWM_CHUNK_LSM_MULT
+ return self.VOLWM_CHUNK_MB
+
+ @property
+ def watermarkLimit(self):
+ return self.VOLWM_FREE_PCT * self.volExtensionChunk * (2 ** 20 / 100)
@property
def blockDev(self):
@@ -1195,12 +1208,6 @@
self._qemuguestSocketFile = (constants.P_LIBVIRT_VMCHANNELS +
self.conf['vmName'].encode('utf-8') +
'.' + _QEMU_GA_DEVICE_NAME)
- # TODO find a better idea how to calculate this constant only after
- # config is initialized
- self._MIN_DISK_REMAIN = \
- ((100 - config.getint('irs', 'volume_utilization_percent')) *
- config.getint('irs', 'volume_utilization_chunk_mb') *
- 2 ** 20 / 100)
self._lastXMLDesc = '<domain><uuid>%s</uuid></domain>' % self.id
self._devXmlHash = '0'
self._released = False
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 7a421bf..8661911 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -800,7 +800,7 @@
if newSize is None:
# newSize is always in megabytes
- newSize = (config.getint('irs', 'volume_utilization_chunk_mb') +
+ newSize = (vmDrive.volExtensionChunk +
((vmDrive.apparentsize + constants.MEGAB - 1) /
constants.MEGAB))
--
To view, visit http://gerrit.ovirt.org/9200
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib61375613712feb7118a80c50b73e678d257f251
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
11 years, 5 months
Change in vdsm[master]: Specify the ACPI flag when shutting down VMs
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: Specify the ACPI flag when shutting down VMs
......................................................................
Specify the ACPI flag when shutting down VMs
In commit e460308 has been introduced the qemu guest agent support.
When such agent channel is present the default shutdown method uses the
guest agent (which might be missing).
For consistency and to maintain the old behavior we should specify to
use ACPI to shutdown the guest.
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Change-Id: I6ca628ce6f4a5c7f6a937a14b12a5078b32e89dd
---
M vdsm/libvirtvm.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/6996/1
--
To view, visit http://gerrit.ovirt.org/6996
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ca628ce6f4a5c7f6a937a14b12a5078b32e89dd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
11 years, 5 months