Change in vdsm[ovirt-4.0]: spec: Require selinux-policy-targeted for CephFS
by Allon Mureinik
Hello Nir Soffer, Freddy Rolland,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/65054
to review the following change.
Change subject: spec: Require selinux-policy-targeted for CephFS
......................................................................
spec: Require selinux-policy-targeted for CephFS
RHEL bug https://bugzilla.redhat.com/1365640 describes an selinux
denial encountered when attempting to use CephFS as a POSIX
storage domain in oVirt.
This patch requires selinux-policy-3.13.1-60 which solves that issue.
Change-Id: I88fed5ee17a7f7f12cb4c442671c5d28dc83626e
Bug-Url: https://bugzilla.redhat.com/1303550
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
Reviewed-on: https://gerrit.ovirt.org/64505
Continuous-Integration: Jenkins CI
Reviewed-by: Freddy Rolland <frolland(a)redhat.com>
Reviewed-by: Nir Soffer <nsoffer(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/65054/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index d7544e7..9c2f613 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -225,7 +225,7 @@
Requires: lvm2 >= 7:2.02.130-5.el7_2.5
Requires: python >= 2.7.5-18.el7_1.1
Requires: policycoreutils-python
-Requires: selinux-policy-targeted >= 3.13.1-16.el7
+Requires: selinux-policy-targeted >= 3.13.1-60.el7
Requires: systemd >= 219-11.el7
%if ! 0%{?centos}
# TODO drop this if when this initscripts is available on centos
--
To view, visit https://gerrit.ovirt.org/65054
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I88fed5ee17a7f7f12cb4c442671c5d28dc83626e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
7 years, 7 months
Change in vdsm[master]: spec: Clean up the initscripts requirement
by Allon Mureinik
Allon Mureinik has uploaded a new change for review.
Change subject: spec: Clean up the initscripts requirement
......................................................................
spec: Clean up the initscripts requirement
Centos has delivered initscripts >= 9.49.30-1.el7_2.3 since August
2nd, 2016 (see, e.g. [1]).
Given that, the TODO comment in the spec file can be addressed and
the file cleaned up a bit.
[1] http://mirror.centos.org/centos/7/updates/x86_64/Packages/
Change-Id: I0c9441c7d1ab9483780cb037f4a5567efdabaeae
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 0 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/55/65055/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 9d35711..2842afa 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -220,10 +220,7 @@
Requires: policycoreutils-python
Requires: selinux-policy-targeted >= 3.13.1-60.el7
Requires: systemd >= 219-11.el7
-%if ! 0%{?centos}
-# TODO drop this if when this initscripts is available on centos
Requires: initscripts >= 9.49.30-1.el7_2.3
-%endif #!centos
%else
Requires: fence-agents-all
Requires: kernel >= 4.1.6
--
To view, visit https://gerrit.ovirt.org/65055
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c9441c7d1ab9483780cb037f4a5567efdabaeae
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
7 years, 7 months
Change in vdsm[master]: guest-lvs: Deactivate guest-lvs when deactivating lvs
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: guest-lvs: Deactivate guest-lvs when deactivating lvs
......................................................................
guest-lvs: Deactivate guest-lvs when deactivating lvs
Before deactivating lvs (e.g. when shuting down a vm), remove holders
that may keep the lv open and prevent deactivation. This patch fixes
this error seen when a raw volume was used as a pv in the guest:
CannotDeactivateLogicalVolume: Cannot deactivate Logical Volume:
('General Storage Exception: ("5 [] [\' Logical volume
5f35b5c0-17d7-4475-9125-e97f1cdb06f9/17e03f6d-008a-45ed-8c73-d9b22430cd6a
is used by another device.\']
Change-Id: I56bd79013909c6dfcae789f0985c6085768e792a
Bug-Url: https://bugzilla.redhat.com/1374545
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/storage_lvm_test.py
M vdsm/storage/lvm.py
2 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/69/64369/1
diff --git a/tests/storage_lvm_test.py b/tests/storage_lvm_test.py
index c5d2af1..d4a1952 100644
--- a/tests/storage_lvm_test.py
+++ b/tests/storage_lvm_test.py
@@ -103,6 +103,31 @@
finally:
run("vgchange", "-an", "ovirt-vg")
+ @ValidateRunningAsRoot
+ def test_deactivate_ovirt_lv_with_guest_lvs(self):
+ with fake_env() as env:
+ log.debug("Creating host lv")
+ run("pvcreate", "-ff", env.device)
+ run("vgcreate", "ovirt-vg", env.device)
+ run("lvcreate", "-n", "ovirt-lv", "-L", "512m", "ovirt-vg")
+ try:
+ log.debug("Creating guest-lv")
+ guest_pv = "/dev/ovirt-vg/ovirt-lv"
+ config = "devices {filter=['a|%s|']}" % guest_pv
+ run("pvcreate", "--config", config, "-ff", "-y", guest_pv)
+ run("vgcreate", "--config", config, "guest-vg", guest_pv)
+ run("lvcreate", "--config", config, "-n", "guest-lv",
+ "-L", "128m", "guest-vg")
+ try:
+ lvm.deactivateLVs("ovirt-vg", ["ovirt-lv"])
+ # ovirt-lv must be inactive
+ self.assertEqual(self.find_active_lvs("ovirt-vg"), [])
+ except AssertionError:
+ run("vgchange", "--config", config, "-an", "guest-vg")
+ raise
+ finally:
+ run("vgchange", "-an", "ovirt-vg")
+
def find_active_lvs(self, vgname):
out = run("lvs", "--noheadings", "-o", "name",
"--select", "lv_active=active", vgname)[0]
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index c501105..eadf11d 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -1260,6 +1260,8 @@
def deactivateLVs(vgName, lvNames):
toDeactivate = [lvName for lvName in lvNames
if _isLVActive(vgName, lvName)]
+ for lvName in toDeactivate:
+ _remove_lv_holders(vgName, lvName)
if toDeactivate:
log.info("Deactivating lvs: vg=%s lvs=%s", vgName, toDeactivate)
_setLVAvailability(vgName, toDeactivate, "n")
--
To view, visit https://gerrit.ovirt.org/64369
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I56bd79013909c6dfcae789f0985c6085768e792a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
7 years, 7 months
Change in vdsm[master]: volume: Add qcow2_compat on create
by Maor Lipchuk
Maor Lipchuk has uploaded a new change for review.
Change subject: volume: Add qcow2_compat on create
......................................................................
volume: Add qcow2_compat on create
Pass qcow2 compat on create.
Change-Id: I8655be6da0b4cbd1c286b0c40288681a991aff19
Signed-off-by: Maor Lipchuk <mlipchuk(a)redhat.com>
---
M vdsm/storage/volume.py
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/64375/1
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index 1339d95..8826ab9 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -690,9 +690,11 @@
self.log.debug('cloning volume %s to %s', self.volumePath,
dstPath)
parent = getBackingVolumePath(self.imgUUID, self.volUUID)
+ domain = sdCache.produce(self.sdUUID)
qemuimg.create(dstPath, backing=parent,
format=sc.fmt2str(volFormat),
- backingFormat=sc.fmt2str(self.getFormat()))
+ backingFormat=sc.fmt2str(self.getFormat()),
+ qcow2_compat=domain.qcow2_compat())
self.teardown(self.sdUUID, self.volUUID)
except Exception as e:
self.log.exception('cannot clone image %s volume %s to %s',
--
To view, visit https://gerrit.ovirt.org/64375
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8655be6da0b4cbd1c286b0c40288681a991aff19
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipchuk(a)redhat.com>
7 years, 7 months
Change in vdsm[master]: network: replace NM_CONTROLLED=no with 'yes'
by automation@ovirt.org
gerrit-hooks has posted comments on this change.
Change subject: network: replace NM_CONTROLLED=no with 'yes'
......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found
--
To view, visit https://gerrit.ovirt.org/56443
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie7f94f15b2d1c63d4eab61bc05e31e3bf1426953
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenkins CI RO
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 7 months
Change in vdsm[ovirt-3.6]: network: replace NM_CONTROLLED=no with 'yes'
by automation@ovirt.org
gerrit-hooks has posted comments on this change.
Change subject: network: replace NM_CONTROLLED=no with 'yes'
......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found
--
To view, visit https://gerrit.ovirt.org/56447
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie7f94f15b2d1c63d4eab61bc05e31e3bf1426953
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenkins CI RO
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 7 months
Change in vdsm[master]: network: replace NM_CONTROLLED=no with 'yes'
by Jenkins CI RO
Jenkins CI RO has abandoned this change.
Change subject: network: replace NM_CONTROLLED=no with 'yes'
......................................................................
Abandoned
Abandoned due to no activity - please restore if still relevant
--
To view, visit https://gerrit.ovirt.org/56443
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ie7f94f15b2d1c63d4eab61bc05e31e3bf1426953
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenkins CI RO
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 7 months
Change in vdsm[ovirt-3.6]: network: replace NM_CONTROLLED=no with 'yes'
by Jenkins CI RO
Jenkins CI RO has abandoned this change.
Change subject: network: replace NM_CONTROLLED=no with 'yes'
......................................................................
Abandoned
Abandoned due to no activity - please restore if still relevant
--
To view, visit https://gerrit.ovirt.org/56447
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ie7f94f15b2d1c63d4eab61bc05e31e3bf1426953
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenkins CI RO
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 7 months
Change in vdsm[master]: guest-lvs: Skip foreign vgs during bootstrap
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: guest-lvs: Skip foreign vgs during bootstrap
......................................................................
guest-lvs: Skip foreign vgs during bootstrap
Previously we tried to deactivate any lv in any vg backed by multipath
device. This may clash with non-ovirt vgs created on a multipath device.
We use now the STORAGE_DOMAIN_TAG to detect oVirt vgs and ignore other
vgs during bootstrap.
Change-Id: I8f072a05026cec8b9d027b52d0adf2e236089706
Bug-Url: https://bugzilla.redhat.com/1374545
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/storage_lvm_test.py
M vdsm/storage/hsm.py
M vdsm/storage/lvm.py
3 files changed, 25 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/70/64370/1
diff --git a/tests/storage_lvm_test.py b/tests/storage_lvm_test.py
index d4a1952..98f5b7e 100644
--- a/tests/storage_lvm_test.py
+++ b/tests/storage_lvm_test.py
@@ -67,13 +67,28 @@
run("lvcreate", "-n", "ovirt-lv-1", "-L", "128m", "ovirt-vg")
run("lvcreate", "-n", "ovirt-lv-2", "-L", "128m", "ovirt-vg")
try:
- lvm.bootstrap()
+ lvm.bootstrap(blockSD.STORAGE_DOMAIN_TAG)
# ovirt-lv must be inactive
self.assertEqual(self.find_active_lvs("ovirt-vg"), [])
finally:
run("vgchange", "-an", "ovirt-vg")
- # TODO: do not modify vgs without STORAGE_DOMAIN_TAG
+ @ValidateRunningAsRoot
+ def test_skip_foreign_vgs(self):
+ with fake_env() as env:
+ log.debug("Creating ovirt lvs")
+ run("pvcreate", "-ff", env.device)
+ # This is not ovirt-vg - no STORAGE_DOMAIN_TAG
+ run("vgcreate", "foreign-vg", env.device)
+ run("lvcreate", "-n", "foreign-lv-1", "-L", "128m", "foreign-vg")
+ run("lvcreate", "-n", "foreign-lv-2", "-L", "128m", "foreign-vg")
+ try:
+ lvm.bootstrap(blockSD.STORAGE_DOMAIN_TAG)
+ # foreign lvs should not be modified
+ self.assertEqual(self.find_active_lvs("foreign-vg"),
+ ["foreign-lv-1", "foreign-lv-2"])
+ finally:
+ run("vgchange", "-an", "foreign-vg")
@ValidateRunningAsRoot
def test_deactivate_unused_ovirt_lv_with_guest_lvs(self):
@@ -94,7 +109,7 @@
run("lvcreate", "--config", config, "-n", "guest-lv-2",
"-L", "128m", "guest-vg")
try:
- lvm.bootstrap()
+ lvm.bootstrap(blockSD.STORAGE_DOMAIN_TAG)
# ovirt-lv must be inactive
self.assertEqual(self.find_active_lvs("ovirt-vg"), [])
except AssertionError:
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index d1b50d2..38d8d14 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -372,7 +372,8 @@
def storageRefresh():
sdCache.refreshStorage()
- lvm.bootstrap(refreshlvs=blockSD.SPECIAL_LVS)
+ lvm.bootstrap(blockSD.STORAGE_DOMAIN_TAG,
+ refreshlvs=blockSD.SPECIAL_LVS)
self._ready = True
self.log.debug("HSM is ready")
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index eadf11d..5e0ce2a 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -638,7 +638,7 @@
_lvminfo = LVMCache()
-def bootstrap(refreshlvs=()):
+def bootstrap(vg_tag, refreshlvs=()):
"""
Bootstrap lvm module
@@ -650,6 +650,10 @@
refreshlvs = set(refreshlvs)
for vg in _lvminfo.getAllVgs():
+ if vg_tag not in vg.tags:
+ log.info("Skipping foreign vg %s", vg.name)
+ continue
+
deactivate = []
refresh = []
--
To view, visit https://gerrit.ovirt.org/64370
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f072a05026cec8b9d027b52d0adf2e236089706
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
7 years, 7 months
Change in vdsm[master]: guest-lvs: Add failing test for guest lvs
by Nir Soffer
Nir Soffer has posted comments on this change.
Change subject: guest-lvs: Add failing test for guest lvs
......................................................................
Patch Set 11: Verified+1
--
To view, visit https://gerrit.ovirt.org/64330
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I80d37278225262bc5692e00aed15654e84119590
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 7 months