Eduardo has uploaded a new change for review.
Change subject: lvm: Prevent auto-activation of logical volumes. ......................................................................
lvm: Prevent auto-activation of logical volumes.
When using FC storage, physical volumes are connected during boot, and vdsm logical volumes are auto-activated by /etc/rc.sysinit and/or /etc/init.d/netfs.
This patch prevents auto-activation of vdsm volumes using new --setactivationskip and --ignoreactivationskip options, introduced in lvm 2.02.100.
Note: The change of existing volumes should be done with a little app running when installing or upgrading vdsm. In addition it should be executable from command line. Should not be part of the vdsm code.
Change-Id: Iab9b7579990d934c60999b4c603c3acf46557be1 Bug-Url: https://bugzilla.redhat.com/1009812 Signed-off-by: Eduardo ewarszaw@redhat.com --- M vdsm/storage/lvm.py 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/20836/1
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py index 0c2964e..2561ae4 100644 --- a/vdsm/storage/lvm.py +++ b/vdsm/storage/lvm.py @@ -769,6 +769,7 @@ lvnames = tuple("%s/%s" % (vg, lv) for lv in lvs) cmd = ["lvchange"] cmd.extend(LVM_NOBACKUP) + cmd.append('--ignoreactivationskip') if isinstance(attrs[0], str): # ("--attribute", "value") cmd.extend(attrs) @@ -1023,7 +1024,8 @@ cont = {True: "y", False: "n"}[contiguous] cmd = ["lvcreate"] cmd.extend(LVM_NOBACKUP) - cmd.extend(("--contiguous", cont, "--size", "%sm" % size)) + cmd.extend(("--setactivationskip", "y", "--ignoreactivationskip", + "--contiguous", cont, "--size", "%sm" % size)) if initialTag is not None: cmd.extend(("--addtag", initialTag)) cmd.extend(("--name", lvName, vgName))
oVirt Jenkins CI Server has posted comments on this change.
Change subject: lvm: Prevent auto-activation of logical volumes. ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4395/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5199/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5275/ : SUCCESS
Dan Kenigsberg has posted comments on this change.
Change subject: lvm: Prevent auto-activation of logical volumes. ......................................................................
Patch Set 1: Code-Review-1
(2 comments)
.................................................... Commit Message Line 6: Line 7: lvm: Prevent auto-activation of logical volumes. Line 8: Line 9: When using FC storage, physical volumes are connected during boot, Line 10: and vdsm logical volumes are auto-activated by /etc/rc.sysinit which code exactly does the auto-activation? wouldn't it be simpler to ask sysv/systemd to be more selective? the new lvm logic of adding one flag to skip and another flag to ignore the first flag sounds crazy, begging for a third flag controlling whether the first flag has precedence over the second one. It reminds me too much of our
llPrepare(self, rw=False, setrw=False). Line 11: and/or /etc/init.d/netfs. Line 12: Line 13: This patch prevents auto-activation of vdsm volumes using new Line 14: --setactivationskip and --ignoreactivationskip options, introduced
Line 11: and/or /etc/init.d/netfs. Line 12: Line 13: This patch prevents auto-activation of vdsm volumes using new Line 14: --setactivationskip and --ignoreactivationskip options, introduced Line 15: in lvm 2.02.100. please put this explicitly into vdsm.spec. Line 16: Line 17: Note: The change of existing volumes should be done with a little app Line 18: running when installing or upgrading vdsm. In addition it should be Line 19: executable from command line. Should not be part of the vdsm code.
Eduardo has posted comments on this change.
Change subject: lvm: Prevent auto-activation of logical volumes. ......................................................................
Patch Set 1:
(1 comment)
.................................................... Commit Message Line 6: Line 7: lvm: Prevent auto-activation of logical volumes. Line 8: Line 9: When using FC storage, physical volumes are connected during boot, Line 10: and vdsm logical volumes are auto-activated by /etc/rc.sysinit I'm agree with you that this is not my preferred API. And I think that the opposite logic will be more convinient for us, but this is the fine grain option that lvm provides by now. Line 11: and/or /etc/init.d/netfs. Line 12: Line 13: This patch prevents auto-activation of vdsm volumes using new Line 14: --setactivationskip and --ignoreactivationskip options, introduced
oVirt Jenkins CI Server has posted comments on this change.
Change subject: lvm: Prevent auto-activation of logical volumes. ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4399/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5203/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5279/ : SUCCESS
Sergey Gotliv has posted comments on this change.
Change subject: lvm: Prevent auto-activation of logical volumes. ......................................................................
Patch Set 2:
You and Nir are working on the same issue:
http://gerrit.ovirt.org/#/c/20832/
Itamar Heim has abandoned this change.
Change subject: lvm: Prevent auto-activation of logical volumes. ......................................................................
Abandoned
old. not touched for a while. please restore if relevant
vdsm-patches@lists.fedorahosted.org