Change in vdsm[master]: multipath: getDeviceDiscardMaxBytes return type
by ishaby@redhat.com
Idan Shaby has uploaded a new change for review.
Change subject: multipath: getDeviceDiscardMaxBytes return type
......................................................................
multipath: getDeviceDiscardMaxBytes return type
Since /sys/block/dm-X/queue/discard_max_bytes may return more than 4GB,
uint might not be enough.
Thus, this patch chenges getDeviceDiscardMaxBytes to read and return it
as a long value.
Change-Id: Icc45c708df0e93ddf94165eb6f3e3630ce8430a4
Signed-off-by: Idan Shaby <ishaby(a)redhat.com>
---
M lib/api/vdsm-api.yml
M vdsm/storage/multipath.py
2 files changed, 12 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/62799/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 8ec6f9f..6c0401a 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -221,7 +221,7 @@
unmapped in a single discard operation. 0 means that the device
does not support discard functionality.
name: discard_max_bytes
- type: uint
+ type: long
- description: Indicates whether or not the device deterministically
returns zeroes when a discarded area is read.
diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py
index 27f720e..6b43bfc 100644
--- a/vdsm/storage/multipath.py
+++ b/vdsm/storage/multipath.py
@@ -168,7 +168,7 @@
def getDeviceDiscardMaxBytes(physDev):
path = os.path.join(SYS_BLOCK, physDev, QUEUE, "discard_max_bytes")
- return read_int(path)
+ return read_long(path)
def getDeviceDiscardZeroesData(physDev):
@@ -176,10 +176,17 @@
return read_int(path)
-def read_int(path):
+def read_line(path):
with open(path, "r") as f:
- data = f.readline()
- return int(data)
+ return f.readline()
+
+
+def read_int(path):
+ return int(read_line(path))
+
+
+def read_long(path):
+ return long(read_line(path))
def getScsiSerial(physdev):
--
To view, visit https://gerrit.ovirt.org/62799
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc45c708df0e93ddf94165eb6f3e3630ce8430a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ishaby(a)redhat.com>
7 years, 8 months
Change in vdsm[master]: net: switch type switch
by automation@ovirt.org
gerrit-hooks has posted comments on this change.
Change subject: net: switch type switch
......................................................................
Patch Set 9:
* #1362399::Update tracker: OK
* Check Bug-Url::OK
* Check Public Bug::#1362399::OK, public bug
* Check Product::#1362399::OK, Correct classification oVirt
* Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0)
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
--
To view, visit https://gerrit.ovirt.org/62330
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia090277ee3c4995f0a313a032ae651ba55dc8989
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 8 months
Change in vdsm[master]: gluster: fix python-blivet dependency issue for python3
by automation@ovirt.org
gerrit-hooks has posted comments on this change.
Change subject: gluster: fix python-blivet dependency issue for python3
......................................................................
Patch Set 2:
* Update tracker: IGNORE, no Bug-Url found
--
To view, visit https://gerrit.ovirt.org/56945
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iad3d89d6daf667a9a505f27e7a1570a6e93696a7
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 8 months
Change in vdsm[master]: gluster: fix python-blivet dependency issue for python3
by Ramesh Nachimuthu
Ramesh N has abandoned this change.
Change subject: gluster: fix python-blivet dependency issue for python3
......................................................................
Abandoned
--
To view, visit https://gerrit.ovirt.org/56945
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon
Gerrit-Change-Id: Iad3d89d6daf667a9a505f27e7a1570a6e93696a7
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months
Change in vdsm[master]: net: early IP+link setup
by automation@ovirt.org
gerrit-hooks has posted comments on this change.
Change subject: net: early IP+link setup
......................................................................
Patch Set 20:
* #1364087::Update tracker: OK
* Check Bug-Url::OK
* Check Public Bug::#1364087::OK, public bug
* Check Product::#1364087::OK, Correct classification oVirt
* Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0)
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
--
To view, visit https://gerrit.ovirt.org/60371
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0555a61c9709be54bfb2587e3020d3046db10ec6
Gerrit-PatchSet: 20
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 8 months
Change in vdsm[master]: net: early IP+link setup
by phoracek@redhat.com
Petr Horáček has posted comments on this change.
Change subject: net: early IP+link setup
......................................................................
Patch Set 20: Verified+1
(2 comments)
OVS networking was restored by vdsm-network-init.service
https://gerrit.ovirt.org/#/c/60371/19/lib/vdsm/network/netrestore.py
File lib/vdsm/network/netrestore.py:
Line 23: import os
Line 24:
Line 25: import six
Line 26:
Line 27: from vdsm.config import config
> Needs to be done though 'compat'.
Done
Line 28: from vdsm.constants import P_VDSM_RUN
Line 29: from vdsm.utils import tobool
Line 30:
Line 31: from . import netswitch
Line 58:
Line 59: for net, attrs in six.iteritems(nets):
Line 60: try:
Line 61: netswitch.setup_ipv6autoconf({net: attrs})
Line 62: except Exception:
> Why not just do it directly like this:
Done
Line 63: logging.exception('IPv6autoconf for {} failed.'.format(net))
Line 64:
Line 65: for net, attrs in six.iteritems(nets):
Line 66: try:
--
To view, visit https://gerrit.ovirt.org/60371
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0555a61c9709be54bfb2587e3020d3046db10ec6
Gerrit-PatchSet: 20
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
7 years, 8 months
Change in vdsm[master]: v2v: filter out Xen VMs with block storage
by shavivi@redhat.com
Shahar Havivi has uploaded a new change for review.
Change subject: v2v: filter out Xen VMs with block storage
......................................................................
v2v: filter out Xen VMs with block storage
virt-v2v is not support importing Xen VMs with block storage domain.
No need to return these VMs via get_external_vms verb
Change-Id: I84512f54f9949640a568a444dd7eeb78db852134
Bug-Url: https://bugzilla.redhat.com/1365411
Signed-off-by: Shahar Havivi <shaharh(a)redhat.com>
---
M lib/vdsm/v2v.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/62368/1
diff --git a/lib/vdsm/v2v.py b/lib/vdsm/v2v.py
index c6a9943..0d9882f 100644
--- a/lib/vdsm/v2v.py
+++ b/lib/vdsm/v2v.py
@@ -880,6 +880,8 @@
except ET.ParseError as e:
logging.error('error parsing domain xml: %s', e)
return
+ if not _block_disk_supported(conn, root):
+ return
try:
_add_general_info(root, params)
except InvalidVMConfiguration as e:
@@ -895,6 +897,16 @@
vms.append(params)
+def _block_disk_supported(conn, root):
+ '''
+ Currently we do not support importing VMs with block device from
+ Xen on Rhel 5.x
+ '''
+ if conn.getURI().startswith(_XEN_SSH_PROTOCOL):
+ return len(root.findall('.//disk[@type="block"]')) == 0
+ return True
+
+
def _add_vm_info(vm, params):
params['vmName'] = vm.name()
# TODO: use new API: vm.state()[0] == libvirt.VIR_DOMAIN_SHUTOFF
--
To view, visit https://gerrit.ovirt.org/62368
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I84512f54f9949640a568a444dd7eeb78db852134
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi(a)redhat.com>
7 years, 8 months
Change in vdsm[master]: storage: Sortable ResourceManager lock namespaces
by alitke@redhat.com
Adam Litke has uploaded a new change for review.
Change subject: storage: Sortable ResourceManager lock namespaces
......................................................................
storage: Sortable ResourceManager lock namespaces
In order to simplify correct locking order, change the namespace constants so
that they sort in the order that they should be taken.
Change-Id: Icfd94f0152c08f6260ca93228fd4c4a792e72051
Signed-off-by: Adam Litke <alitke(a)redhat.com>
---
M lib/vdsm/storage/constants.py
M tests/storage_guarded_test.py
2 files changed, 24 insertions(+), 16 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/61436/1
diff --git a/lib/vdsm/storage/constants.py b/lib/vdsm/storage/constants.py
index e49c88e..9803b89 100644
--- a/lib/vdsm/storage/constants.py
+++ b/lib/vdsm/storage/constants.py
@@ -22,11 +22,12 @@
from vdsm import qemuimg
+
# ResourceManager Lock Namespaces
-STORAGE = "Storage"
-LVM_ACTIVATION_NAMESPACE = 'lvmActivationNS'
-IMAGE_NAMESPACE = 'imageNS'
-VOLUME_NAMESPACE = 'volumeNS'
+STORAGE = "00_Storage"
+LVM_ACTIVATION_NAMESPACE = '01_lvmActivationNS'
+IMAGE_NAMESPACE = '02_imageNS'
+VOLUME_NAMESPACE = '03_volumeNS'
SECTOR_SIZE = 512
VG_EXTENT_SIZE_MB = 128
diff --git a/tests/storage_guarded_test.py b/tests/storage_guarded_test.py
index 29db745..bf4371a 100644
--- a/tests/storage_guarded_test.py
+++ b/tests/storage_guarded_test.py
@@ -25,9 +25,11 @@
from storagefakelib import FakeResourceManager
from testlib import VdsmTestCase, expandPermutations, permutations
+from vdsm.storage import constants as sc
from vdsm.storage import guarded
from storage import resourceManager as rm
+from storage.resourceFactories import IMAGE_NAMESPACE
@expandPermutations
@@ -58,29 +60,34 @@
def test_sorting(self):
src_locks = [
- guarded.ResourceManagerLock('C', 'a', rm.LockType.shared),
- guarded.ResourceManagerLock('A', 'b', rm.LockType.shared),
+ guarded.ResourceManagerLock(IMAGE_NAMESPACE, 'a',
+ rm.LockType.shared),
+ guarded.ResourceManagerLock(sc.STORAGE, 'b',
+ rm.LockType.shared),
]
src = GuardedEntity(src_locks)
dst_locks = [
- guarded.ResourceManagerLock('A', 'a', rm.LockType.shared),
- guarded.ResourceManagerLock('B', 'a', rm.LockType.shared),
+ guarded.ResourceManagerLock(sc.STORAGE, 'a', rm.LockType.shared),
+ guarded.ResourceManagerLock(IMAGE_NAMESPACE, 'b',
+ rm.LockType.exclusive),
]
dst = GuardedEntity(dst_locks)
with self.env() as rmanager:
calls = [
- ('acquireResource', ('A', 'a', rm.LockType.shared), {}),
- ('acquireResource', ('A', 'b', rm.LockType.shared), {}),
- ('acquireResource', ('B', 'a', rm.LockType.shared), {}),
- ('acquireResource', ('C', 'a', rm.LockType.shared), {}),
+ ('acquireResource', (sc.STORAGE, 'a', rm.LockType.shared), {}),
+ ('acquireResource', (sc.STORAGE, 'b', rm.LockType.shared), {}),
+ ('acquireResource',
+ (IMAGE_NAMESPACE, 'a', rm.LockType.shared), {}),
+ ('acquireResource',
+ (IMAGE_NAMESPACE, 'b', rm.LockType.exclusive), {}),
]
with guarded.operation_context((src, dst)):
self.assertEqual(calls, rmanager.__calls__)
calls.extend([
- ('releaseResource', ('C', 'a'), {}),
- ('releaseResource', ('B', 'a'), {}),
- ('releaseResource', ('A', 'b'), {}),
- ('releaseResource', ('A', 'a'), {}),
+ ('releaseResource', (IMAGE_NAMESPACE, 'a'), {}),
+ ('releaseResource', (IMAGE_NAMESPACE, 'b'), {}),
+ ('releaseResource', (sc.STORAGE, 'b'), {}),
+ ('releaseResource', (sc.STORAGE, 'a'), {}),
])
self.assertEqual(calls, rmanager.__calls__)
--
To view, visit https://gerrit.ovirt.org/61436
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icfd94f0152c08f6260ca93228fd4c4a792e72051
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke(a)redhat.com>
7 years, 8 months
Change in vdsm[master]: storage: export volume lease state in getVolumeInfo
by alitke@redhat.com
Adam Litke has uploaded a new change for review.
Change subject: storage: export volume lease state in getVolumeInfo
......................................................................
storage: export volume lease state in getVolumeInfo
In order to support an entity-based polling methodology (ie. in the new SDM
verbs) we must know whether a volume is currently locked by a long running
operation. Extend the getVolumeInfo API to report whether the lease is free or
held. The API defines 'EXCLUSIVE' and 'SHARED' modes for future extensibility even though today we only support exclusive volume leases.
Change-Id: If07ac876816b0a0ba61444fd94dc761508b09655
Signed-off-by: Adam Litke <alitke(a)redhat.com>
---
M lib/api/vdsm-api.yml
M lib/vdsm/storage/constants.py
M vdsm/storage/volume.py
3 files changed, 30 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/61995/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index a99c488..5b0c385 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -6849,6 +6849,17 @@
LEAF: The Volume is a writable leaf
SHARED: The Volume is a shared template
+ VolumeLeaseStatus: &VolumeLeaseStatus
+ added: '4.1'
+ description: An enumeration of Volume Lease statuses
+ name: VolumeLeaseStatus
+ type: enum
+ values:
+ NONE: The Volume does not have an associated lease
+ FREE: The lease is free
+ EXCLUSIVE: The lease is held in exclusive mode
+ SHARED: The lease is held in shared mode
+
VolumeInfo: &VolumeInfo
added: '3.1'
description: Information about a Volume.
@@ -6927,6 +6938,10 @@
- description: The Image associated with the Volume
name: image
type: *UUID
+
+ - description: The status of the Volume lease
+ name: lease
+ type: *VolumeLeaseStatus
type: object
VolumeSizeInfo: &VolumeSizeInfo
diff --git a/lib/vdsm/storage/constants.py b/lib/vdsm/storage/constants.py
index e49c88e..1446076 100644
--- a/lib/vdsm/storage/constants.py
+++ b/lib/vdsm/storage/constants.py
@@ -83,6 +83,12 @@
RAW_FORMAT: qemuimg.FORMAT.RAW,
}
+# Volume lease states
+LEASE_NONE = "NONE" # No lease
+LEASE_FREE = "FREE" # The lease is available
+LEASE_EXCLUSIVE = "EXCLUSIVE" # The lease is held in exlusive mode
+LEASE_SHARED = "SHARED" # The lease is held in shared moce
+
BLANK_UUID = "00000000-0000-0000-0000-000000000000"
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index b7a5608..285ed4d 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -181,6 +181,14 @@
def isSparse(self):
return self.getType() == sc.SPARSE_VOL
+ def getLeaseStatus(self):
+ sd_manifest = sdCache.produce_manifest(self.sdUUID)
+ if not sd_manifest.hasVolumeLeases():
+ return sc.LEASE_NONE
+ ver, owners = sd_manifest.inquireVolumeLease(self.imgUUID,
+ self.volUUID)
+ return sc.LEASE_EXCLUSIVE if owners else sc.LEASE_FREE
+
def metadata2info(self, meta):
return {
"uuid": self.volUUID,
@@ -217,6 +225,7 @@
info['apparentsize'] = str(vsize)
info['truesize'] = str(avsize)
info['status'] = "OK"
+ info['lease'] = self.getLeaseStatus()
except se.StorageException as e:
self.log.debug("exception: %s:%s" % (str(e.message), str(e.value)))
info['apparentsize'] = "0"
--
To view, visit https://gerrit.ovirt.org/61995
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If07ac876816b0a0ba61444fd94dc761508b09655
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke(a)redhat.com>
7 years, 8 months