Yeela Kaplan has uploaded a new change for review.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Change scsi_id command path to be configured at runtime
On fedora 18 scsi_id path is no longer under /sbin/scsi_id, we configure vdsm to look for the path at runtime and thus remove it from constants.
Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=886087 Signed-off-by: Yeela Kaplan ykaplan@redhat.com --- M configure.ac M vdsm/constants.py.in M vdsm/storage/multipath.py M vdsm/sudoers.vdsm.in 4 files changed, 39 insertions(+), 37 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/10824/1
diff --git a/configure.ac b/configure.ac index 3489e38..edc0b50 100644 --- a/configure.ac +++ b/configure.ac @@ -167,8 +167,6 @@ AC_PATH_PROG([REBOOT_PATH], [reboot], [/usr/bin/reboot]) AC_PATH_PROG([RPM_PATH], [rpm], [/bin/rpm]) AC_PATH_PROG([RSYNC_PATH], [rsync], [/usr/bin/rsync]) -AC_PATH_PROG([SCSI_ID_PATH], [scsi_id], [/sbin/scsi_id], - [$PATH$PATH_SEPARATOR/lib/udev]) AC_PATH_PROG([SED_PATH], [sed], [/bin/sed]) AC_PATH_PROG([SERVICE_PATH], [service], [/sbin/service]) AC_PATH_PROG([SETSID_PATH], [setsid], [/usr/bin/setsid]) diff --git a/vdsm/constants.py.in b/vdsm/constants.py.in index 21a06e7..e7e2f83 100644 --- a/vdsm/constants.py.in +++ b/vdsm/constants.py.in @@ -127,7 +127,6 @@ EXT_REBOOT = '@REBOOT_PATH@' EXT_RSYNC = '@RSYNC_PATH@'
-EXT_SCSI_ID = '@SCSI_ID_PATH@' # TBD ! EXT_SERVICE = '@SERVICE_PATH@' EXT_SETSID = '@SETSID_PATH@' EXT_SH = '/bin/sh' # The shell path is invariable @@ -155,31 +154,3 @@ STRG_ISCSI_HOST = "iscsi_host/" STRG_SCSI_HOST = "scsi_host/" STRG_ISCSI_SESSION = "iscsi_session/" -STRG_MPATH_CONF = ( - "\n\n" - "defaults {\n" - " polling_interval 5\n" - " getuid_callout "@SCSI_ID_PATH@ --whitelisted " - "--replace-whitespace --device=/dev/%n"\n" - " no_path_retry fail\n" - " user_friendly_names no\n" - " flush_on_last_del yes\n" - " fast_io_fail_tmo 5\n" - " dev_loss_tmo 30\n" - " max_fds 4096\n" - "}\n" - "\n" - "devices {\n" - "device {\n" - " vendor "HITACHI"\n" - " product "DF.*"\n" - " getuid_callout "@SCSI_ID_PATH@ --whitelisted " - "--replace-whitespace --device=/dev/%n"\n" - "}\n" - "device {\n" - " vendor "COMPELNT"\n" - " product "Compellent Vol"\n" - " no_path_retry fail\n" - "}\n" - "}" -) diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py index b8c84a9..e356eab 100644 --- a/vdsm/storage/multipath.py +++ b/vdsm/storage/multipath.py @@ -30,6 +30,7 @@ from collections import namedtuple
from vdsm import constants +from vdsm import utils import misc import iscsi import supervdsm @@ -50,12 +51,45 @@ OLD_TAGS = ["# RHAT REVISION 0.2", "# RHEV REVISION 0.3", "# RHEV REVISION 0.4", "# RHEV REVISION 0.5", "# RHEV REVISION 0.6", "# RHEV REVISION 0.7", - "# RHEV REVISION 0.8"] -MPATH_CONF_TAG = "# RHEV REVISION 0.9" + "# RHEV REVISION 0.8", "# RHEV REVISION 0.9"] +MPATH_CONF_TAG = "# RHEV REVISION 1.0" MPATH_CONF_PRIVATE_TAG = "# RHEV PRIVATE" -MPATH_CONF_TEMPLATE = MPATH_CONF_TAG + constants.STRG_MPATH_CONF +STRG_MPATH_CONF = ( + "\n\n" + "defaults {\n" + " polling_interval 5\n" + " getuid_callout "%(scsi_id_path)s --whitelisted " + "--replace-whitespace --device=/dev/%%n"\n" + " no_path_retry fail\n" + " user_friendly_names no\n" + " flush_on_last_del yes\n" + " fast_io_fail_tmo 5\n" + " dev_loss_tmo 30\n" + " max_fds 4096\n" + "}\n" + "\n" + "devices {\n" + "device {\n" + " vendor "HITACHI"\n" + " product "DF.*"\n" + " getuid_callout "%(scsi_id_path)s --whitelisted " + "--replace-whitespace --device=/dev/%%n"\n" + "}\n" + "device {\n" + " vendor "COMPELNT"\n" + " product "Compellent Vol"\n" + " no_path_retry fail\n" + "}\n" + "}" +) +MPATH_CONF_TEMPLATE = MPATH_CONF_TAG + STRG_MPATH_CONF
log = logging.getLogger("Storage.Multipath") + +_scsi_id = utils.CommandPath("scsi_id", + "/sbin/scsi_id", # RHEL + "/usr/lib/udev/scsi_id", # Fedora + )
def rescan(): @@ -128,7 +162,7 @@ os.path.basename(MPATH_CONF), MAX_CONF_COPIES, cp=True, persist=True) with tempfile.NamedTemporaryFile() as f: - f.write(MPATH_CONF_TEMPLATE) + f.write(MPATH_CONF_TEMPLATE % {'scsi_id_path': _scsi_id.cmd}) f.flush() cmd = [constants.EXT_CP, f.name, MPATH_CONF] rc = misc.execCmd(cmd, sudo=True)[0] @@ -174,7 +208,7 @@
def getScsiSerial(physdev): blkdev = os.path.join("/dev", physdev) - cmd = [constants.EXT_SCSI_ID, + cmd = [_scsi_id.cmd, "--page=0x80", "--whitelisted", "--export", diff --git a/vdsm/sudoers.vdsm.in b/vdsm/sudoers.vdsm.in index 688fe16..2ebec96 100644 --- a/vdsm/sudoers.vdsm.in +++ b/vdsm/sudoers.vdsm.in @@ -23,7 +23,6 @@ @SERVICE_PATH@ iscsid *, \ @SERVICE_PATH@ multipathd restart, \ @SERVICE_PATH@ multipathd reload, \ - @SCSI_ID_PATH@, \ @ISCSIADM_PATH@ *, \ @LVM_PATH@, \ @CAT_PATH@ /sys/block/*/device/../../*, \
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/650/ (2/2)
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/615/ (1/2)
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/615/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/650/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(1 inline comment)
great step towards cleaning constants.py. thanks.
a very minor comment, though.
And please review my http://gerrit.ovirt.org/10830
.................................................... File vdsm/storage/multipath.py Line 86: Line 87: log = logging.getLogger("Storage.Multipath") Line 88: Line 89: _scsi_id = utils.CommandPath("scsi_id", Line 90: "/sbin/scsi_id", # RHEL please avoid the RHEL trademark
RHEL -> EL6 Line 91: "/usr/lib/udev/scsi_id", # Fedora Line 92: ) Line 93: Line 94:
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/617/ (2/2)
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/652/ (1/2)
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/617/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/652/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 2: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 2: I would prefer that you didn't submit this
It seems that there is a deeper problem regarding F18's multipath - it does not even have getuid_callout:
http://lists.ovirt.org/pipermail/users/2013-January/011474.html
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Yeela Kaplan has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 2: Verified
Verified on el and fedora 18.
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Patch Set 2: Looks good to me, approved
apparently,
Jan 10 23:49:27 | multipath.conf +5, invalid keyword: getuid_callout
is no more than an annoying warning, and has no functional effect. Thus, we can take this partial fix now, and worry about the warning in a future patch.
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Change scsi_id command path to be configured at runtime ......................................................................
Change scsi_id command path to be configured at runtime
On fedora 18 scsi_id path is no longer under /sbin/scsi_id, we configure vdsm to look for the path at runtime and thus remove it from constants.
Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=886087 Signed-off-by: Yeela Kaplan ykaplan@redhat.com --- M configure.ac M vdsm/constants.py.in M vdsm/storage/multipath.py M vdsm/sudoers.vdsm.in 4 files changed, 39 insertions(+), 37 deletions(-)
Approvals: Yeela Kaplan: Verified Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/10824 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I409d4da0ba429564466271aded32e96f9401cd6c Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org