[node-patches] Change in ovirt-node[master]: mount_config: fix non-default directory persistence

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Jul 3 16:00:57 UTC 2014


Fabian Deutsch has submitted this change and it was merged.

Change subject: mount_config: fix non-default directory persistence
......................................................................


mount_config: fix non-default directory persistence

Currently mount_config fails to restore directories that are not
present in the original image of the root filesystem. E.g.

    mkdir -p /var/lib/vdsm/foobar/moo
    echo "123" > /var/lib/vdsm/foobar/moo/cow.txt
    persist /var/lib/vdsm/foobar

Then, after reboot, ovirt_start_early will call mount_config which
will result in
    mkdir -p /var/lib/vdsm
    touch foobar
    mount -n --bind /config/var/lib/vdsm/foobar /var/lib/vdsm/foobar

This will fail because one can't bind mount a directory on a file.

This patch fixes this issue.

Change-Id: Ifa2b854980ee28cce5d55e0faf30442e6c01a4b8
Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
---
M scripts/ovirt-functions.in
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Douglas Schilling Landgraf: Looks good to me, but someone else must approve
  Alan Pevec: Looks good to me, but someone else must approve
  Antoni Segura Puimedon: Verified
  Ryan Barry: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa2b854980ee28cce5d55e0faf30442e6c01a4b8
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Alan Pevec <apevec at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the node-patches mailing list