Hello Fabian Deutsch, Nir Soffer,

I'd like you to do a code review.  Please visit

    https://gerrit.ovirt.org/40685

to review the following change.

Change subject: persist: /etc/multipath/wwwids
......................................................................

persist: /etc/multipath/wwwids

Persist configured /etc/multipah/wwwids.
This change helps vdsm to keep the configured lun's intact during
reboots or upgrades.

Change-Id: I7f6b5a6b0bed6521503b972866d93a7da5cd28fe
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1191401
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/40187
Reviewed-by: Nir Soffer <[email protected]>
Reviewed-by: Fabian Deutsch <[email protected]>
---
M hooks/Makefile.am
A hooks/on-boot/03-persist-multipath-wwids
A hooks/pre-upgrade/03-persist-multipath-wwids
M ovirt-node-plugin-vdsm.spec.in
4 files changed, 28 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node-plugin-vdsm 
refs/changes/85/40685/1

diff --git a/hooks/Makefile.am b/hooks/Makefile.am
index 2d01579..62ab3f1 100644
--- a/hooks/Makefile.am
+++ b/hooks/Makefile.am
@@ -21,6 +21,7 @@
 
 dist_preupgrade_SCRIPTS = \
        pre-upgrade/01-vdsm \
+       on-boot/03-persist-multipath-wwids \
        $(NULL)
 
 dist_postupgrade_SCRIPTS = \
@@ -30,5 +31,6 @@
 dist_onboot_SCRIPTS = \
        on-boot/01-vdsm-configure \
        on-boot/02-vdsm-sebool-config \
+       on-boot/03-persist-multipath-wwids \
        on-boot/90-start-vdsm \
        $(NULL)
diff --git a/hooks/on-boot/03-persist-multipath-wwids 
b/hooks/on-boot/03-persist-multipath-wwids
new file mode 100644
index 0000000..e4bc9fe
--- /dev/null
+++ b/hooks/on-boot/03-persist-multipath-wwids
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# 03-persist-multipath-wwids - Copyright (C) 2015 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+MULTIPATH_DIR="/etc/multipath"
+WWIDS_PATH="${MULTIPATH_DIR}/wwids"
+
+if [ ! -f "/config${WWIDS_PATH}" ]; then
+    if [ ! -d "${MULTIPATH_DIR}" ]; then
+        mkdir ${MULTIPATH_DIR}
+    fi
+    touch ${WWIDS_PATH}
+    persist ${WWIDS_PATH}
+fi
diff --git a/hooks/pre-upgrade/03-persist-multipath-wwids 
b/hooks/pre-upgrade/03-persist-multipath-wwids
new file mode 100644
index 0000000..3ab599e
--- /dev/null
+++ b/hooks/pre-upgrade/03-persist-multipath-wwids
@@ -0,0 +1 @@
+../on-boot/03-persist-multipath-wwids
\ No newline at end of file
diff --git a/ovirt-node-plugin-vdsm.spec.in b/ovirt-node-plugin-vdsm.spec.in
index e828e68..0324427 100644
--- a/ovirt-node-plugin-vdsm.spec.in
+++ b/ovirt-node-plugin-vdsm.spec.in
@@ -97,9 +97,11 @@
 %license COPYING
 %{python_sitelib}/ovirt/node/setup/vdsm
 %{_libexecdir}/ovirt-node/hooks/pre-upgrade/01-vdsm
+%{_libexecdir}/ovirt-node/hooks/pre-upgrade/03-persist-multipath-wwids
 %{_libexecdir}/ovirt-node/hooks/post-upgrade/01-sanlock-check
 %{_libexecdir}/ovirt-node/hooks/on-boot/01-vdsm-configure
 %{_libexecdir}/ovirt-node/hooks/on-boot/02-vdsm-sebool-config
+%{_libexecdir}/ovirt-node/hooks/on-boot/03-persist-multipath-wwids
 %{_libexecdir}/ovirt-node/hooks/on-boot/90-start-vdsm
 %{_sysconfdir}/ovirt-plugins.d
 %{_sysconfdir}/default/version.ovirt-node-plugin-vdsm


-- 
To view, visit https://gerrit.ovirt.org/40685
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f6b5a6b0bed6521503b972866d93a7da5cd28fe
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node-plugin-vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Fabian Deutsch <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to