Hello Fabian Deutsch,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/64904
to review the following change.
Change subject: service: Add vdsm-tool-update service
......................................................................
service: Add vdsm-tool-update service
oVirt-Node Next provides updates via squashfs images and
between major/minor updates based on EL7 might occur changes
of selinux policy/booleans affecting previous vdsm settings.
This patch creates a new service 'vdsm-tool-update' that handle
such image updates scenarios.
Change-Id: Ib9c4fffb09d2a5c49b0462693fb2beca47fb58ea
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1373389
Signed-off-by: Fabian Deutsch <fabiand(a)fedoraproject.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M init/systemd/85-vdsmd.preset
M static/Makefile.am
A static/usr/lib/systemd/system/vdsm-tool-update.service
M vdsm.spec.in
4 files changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/64904/1
diff --git a/init/systemd/85-vdsmd.preset b/init/systemd/85-vdsmd.preset
index 6da4332c..632235f 100644
--- a/init/systemd/85-vdsmd.preset
+++ b/init/systemd/85-vdsmd.preset
@@ -5,6 +5,7 @@
enable supervdsmd.service
enable vdsm-network.service
enable vdsm-network-init.service
+enable vdsm-tool-update.service
enable mom-vdsm.service
disable ksmtuned.service
diff --git a/static/Makefile.am b/static/Makefile.am
index 040d6ec..68a98c0 100644
--- a/static/Makefile.am
+++ b/static/Makefile.am
@@ -86,6 +86,7 @@
./usr/lib/systemd/system/supervdsmd.service \
./usr/lib/systemd/system/vdsm-network.service \
./usr/lib/systemd/system/vdsm-network-init.service \
+ ./usr/lib/systemd/system/vdsm-tool-update.service \
./usr/lib/systemd/system/vdsmd.service \
$(NULL)
@@ -111,5 +112,6 @@
./usr/lib/systemd/system/supervdsmd.service.in \
./usr/lib/systemd/system/vdsm-network.service.in \
./usr/lib/systemd/system/vdsm-network-init.service.in \
+ ./usr/lib/systemd/system/vdsm-tool-update.service \
./usr/lib/systemd/system/vdsmd.service.in \
$(NULL)
diff --git a/static/usr/lib/systemd/system/vdsm-tool-update.service
b/static/usr/lib/systemd/system/vdsm-tool-update.service
new file mode 100644
index 0000000..ad39290
--- /dev/null
+++ b/static/usr/lib/systemd/system/vdsm-tool-update.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Reconfigure vdsmd
+Conflicts=shutdown.target
+Before=supervdsmd.service vdsmd.service shutdown.target systemd-update-done.service
+ConditionNeedsUpdate=/usr
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/vdsm-tool configure --force
+
+[Install]
+WantedBy=multi-user.target
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 80360d0..23e079e 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -849,6 +849,7 @@
%systemd_post supervdsmd.service
%systemd_post vdsm-network.service
%systemd_post vdsm-network-init.service
+%systemd_post vdsm-tool-update.service
%systemd_post mom-vdsm.service
%systemd_post ksmtuned.service
@@ -863,6 +864,7 @@
%systemd_preun vdsmd.service
%systemd_preun vdsm-network.service
%systemd_preun vdsm-network-init.service
+%systemd_preun vdsm-tool-update.service
%systemd_preun supervdsmd.service
%systemd_preun mom-vdsm.service
%systemd_preun ksmtuned.service
@@ -907,6 +909,7 @@
%{_unitdir}/vdsmd.service
%{_unitdir}/vdsm-network.service
%{_unitdir}/vdsm-network-init.service
+%{_unitdir}/vdsm-tool-update.service
%{_unitdir}/supervdsmd.service
%{_unitdir}/mom-vdsm.service
%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf
--
To view, visit
https://gerrit.ovirt.org/64904
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9c4fffb09d2a5c49b0462693fb2beca47fb58ea
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand(a)redhat.com>