Douglas Schilling Landgraf has uploaded a new change for review. Change subject: hooks: Add hook for ovirt-node boot ......................................................................
hooks: Add hook for ovirt-node boot Configure VDSM every boot to avoid error on upgrades which vdsm configuration files might bring different header/footer versions. Requires http://gerrit.ovirt.org/#/c/28953/ Change-Id: I793d21768c103547cd8082e5353c074245c54535 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1101215 Signed-off-by: Douglas Schilling Landgraf <[email protected]> --- M hooks/Makefile.am M hooks/README A hooks/on-boot/01-vdsm-configure M ovirt-node-plugin-vdsm.spec.in 4 files changed, 27 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node-plugin-vdsm refs/changes/72/28972/1 diff --git a/hooks/Makefile.am b/hooks/Makefile.am index 50067df..9a6bbdf 100644 --- a/hooks/Makefile.am +++ b/hooks/Makefile.am @@ -16,7 +16,12 @@ # also available at http://www.gnu.org/copyleft/gpl.html. preupgradedir = $(libexecdir)/ovirt-node/hooks/pre-upgrade +onbootdir = ${sysconfdir}/ovirt-node/hooks/on-boot dist_preupgrade_SCRIPTS = \ pre-upgrade/01-vdsm \ $(NULL) + +dist_onboot_SCRIPTS = \ + on-boot/01-vdsm-configure \ + $(NULL) diff --git a/hooks/README b/hooks/README index 44108ac..027834f 100644 --- a/hooks/README +++ b/hooks/README @@ -1,2 +1,7 @@ -For information about ovirt-node-upgrade tool, please visit: +Hooks for ovirt-node-upgrade tool please visit: +=================================================== http://www.ovirt.org/Ovirt-node-upgrade + +Hooks for every ovirt-node boot +================================= +Copy the hook into /etc/ovirt-node/hooks/on-boot diff --git a/hooks/on-boot/01-vdsm-configure b/hooks/on-boot/01-vdsm-configure new file mode 100644 index 0000000..dfe1983 --- /dev/null +++ b/hooks/on-boot/01-vdsm-configure @@ -0,0 +1,15 @@ +#!/bin/sh +# +# 01-vdsm-configure - Copyright (C) 2014 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. +if ! vdsm-tool is-configured &> /dev/null; then + vdsm-tool configure --force +fi diff --git a/ovirt-node-plugin-vdsm.spec.in b/ovirt-node-plugin-vdsm.spec.in index 81c4ee9..699159f 100644 --- a/ovirt-node-plugin-vdsm.spec.in +++ b/ovirt-node-plugin-vdsm.spec.in @@ -74,6 +74,7 @@ %files %{python_sitelib}/ovirt/node/setup/vdsm %{_libexecdir}/ovirt-node/hooks/pre-upgrade/01-vdsm +%{_sysconfdir}/ovirt-node/hooks/on-boot/01-vdsm-configure %{_sysconfdir}/ovirt-plugins.d %changelog -- To view, visit http://gerrit.ovirt.org/28972 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I793d21768c103547cd8082e5353c074245c54535 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node-plugin-vdsm Gerrit-Branch: node-3.0 Gerrit-Owner: Douglas Schilling Landgraf <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
