Nir Soffer has uploaded a new change for review. Change subject: multiapth: Reorganize constants and improve documentation ......................................................................
multiapth: Reorganize constants and improve documentation It is nicer to work with code when related items are grouped together and when groups have documentation. Now the module start with a description of the VDSM REVISION tag, which must be in the first line of the file, followed by the current and old tag values. Then we discuss the VDSM PRIVATE tag, which may be in the second line, followed by the current and old tag values. Previously you had to read the code to understand this logic. Change-Id: Id853b50ede32d9f0b05ef610ec5008b1d4ead2da Signed-off-by: Nir Soffer <[email protected]> --- M lib/vdsm/tool/configurators/multipath.py 1 file changed, 23 insertions(+), 21 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/44863/1 diff --git a/lib/vdsm/tool/configurators/multipath.py b/lib/vdsm/tool/configurators/multipath.py index 2ce1ea3..42fd3d4 100644 --- a/lib/vdsm/tool/configurators/multipath.py +++ b/lib/vdsm/tool/configurators/multipath.py @@ -34,7 +34,30 @@ _CONF_FILE = "/etc/multipath.conf" +# The first line of multipath.conf configured by vdsm must contain a +# "VDSM REVISION X.Y" tag. Note that older version used "RHEV REVISION X.Y" +# format. + _CURRENT_TAG = "# VDSM REVISION 1.2" + +_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", + "# RHEV REVISION 0.9", + "# RHEV REVISION 1.0", + "# RHEV REVISION 1.1", +] + +# The second line of multipath.conf may contain PRIVATE_TAG. This means +# vdsm-tool should never change the conf file even when using the --force flag. + +_PRIVATE_TAG = "# VDSM PRIVATE" +_OLD_PRIVATE_TAG = "# RHEV PRIVATE" _CONF_DATA = """\ %(current_tag)s @@ -87,27 +110,6 @@ # } """ % {"current_tag": _CURRENT_TAG} - -# conf file configured by vdsm should contain a tag -# in form of "RHEV REVISION X.Y" -_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", - "# RHEV REVISION 0.9", - "# RHEV REVISION 1.0", - "# RHEV REVISION 1.1", -] - -# Having the PRIVATE_TAG in the conf file means -# vdsm-tool should never change the conf file -# even when using the --force flag -_PRIVATE_TAG = "# VDSM PRIVATE" -_OLD_PRIVATE_TAG = "# RHEV PRIVATE" # If multipathd is up, it will be reloaded after configuration, # or started before vdsm starts, so service should not be stopped -- To view, visit https://gerrit.ovirt.org/44863 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id853b50ede32d9f0b05ef610ec5008b1d4ead2da Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
