Change in vdsm[ovirt-3.4]: libvirt_configure: unpersist logrotate.d/libvirt

ybronhei at redhat.com ybronhei at redhat.com
Thu Mar 13 18:23:48 UTC 2014


Hello Douglas Schilling Landgraf, Dan Kenigsberg,

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

    http://gerrit.ovirt.org/25756

to review the following change.

Change subject: libvirt_configure: unpersist logrotate.d/libvirt
......................................................................

libvirt_configure: unpersist logrotate.d/libvirt

On commit 247a76e7 we moved the libvirt settings to libvirt_configure.sh.in and now
we see that vdsm cannot rename temp. file to /etc/logrotate.d/libvirtd on
ovirt-node system at the stage we execute vdsm-tool configure --force.
This patch will add the command unpersist before renaming the file,
otherwise ovirt-node will complain with "Device or resource busy".

Change-Id: Icd0e6b3ea39680ac3fc8ec5731aa6be3bd8e4deb
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1074257
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/25700
Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/tool/libvirt_configure.sh.in
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/25756/1

diff --git a/lib/vdsm/tool/libvirt_configure.sh.in b/lib/vdsm/tool/libvirt_configure.sh.in
index 88b4080..eacb37c 100755
--- a/lib/vdsm/tool/libvirt_configure.sh.in
+++ b/lib/vdsm/tool/libvirt_configure.sh.in
@@ -302,12 +302,20 @@
     @SED_PATH@ -i 's/^/# VDSM backup/' "$llogr"
     @SED_PATH@ -e "/# vdsm/,/# end vdsm/d" "${llogr}" >> "${stanza}"
     local oldmod=`/usr/bin/stat --format=%a "${llogr}"`
+
+    # unpersist cmd is remove_config on ovirt-functions
+    if isOvirtNode; then
+        . /usr/libexec/ovirt-functions
+        remove_config "${llogr}"
+    fi
     @MV_PATH@ "${stanza}" "${llogr}"
+
     if [ -n "${oldmod}" ]; then
         @CHMOD_PATH@ "${oldmod}" "${llogr}"
     fi
     restorecon "${llogr}"
 
+    # persist cmd is ovirt_store_config on ovirt-functions
     if isOvirtNode; then
         . /usr/libexec/ovirt-functions
         ovirt_store_config "${lconf}" "${qconf}" "${ldconf}" "${llogr}"


-- 
To view, visit http://gerrit.ovirt.org/25756
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd0e6b3ea39680ac3fc8ec5731aa6be3bd8e4deb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>


More information about the vdsm-patches mailing list