Fabian Deutsch has uploaded a new change for review. Change subject: functions: Make sure a stored file is bind mounted ......................................................................
functions: Make sure a stored file is bind mounted Previously the ovirt_store_config function was not correctly bind mounting files into the target, if the contents of that file were unchanged compared to the laready persisted file. This could cause a situation where changes done to a file after ovirt_store_config was called, were lost. This is especially annoying if those were newly set passwords. Change-Id: If26579837d4b91e96f785d79ec6ad07201735747 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1246117 Signed-off-by: Fabian Deutsch <[email protected]> --- M src/ovirtnode/ovirtfunctions.py 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/64/44164/1 diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py index dc37460..6535e33 100644 --- a/src/ovirtnode/ovirtfunctions.py +++ b/src/ovirtnode/ovirtfunctions.py @@ -844,7 +844,16 @@ rc = rc and True else: logger.warn(filename + " Already persisted") + + # Even if persisted, make sure it's mounted + if not check_bind_mount(filename): + if not system("mount -n --bind " + src + " " + \ + filename): + logger.error("Failed to mount unchanged file %r" % + filename) + rc = rc and True + return rc def ovirt_store_config_retnum(filename): -- To view, visit https://gerrit.ovirt.org/44164 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If26579837d4b91e96f785d79ec6ad07201735747 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Fabian Deutsch <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
