[node-patches] Change in ovirt-node[ovirt-3.5]: functions: Make sure a stored file is bind mounted
fabiand at redhat.com
fabiand at redhat.com
Thu Jul 30 16:15:14 UTC 2015
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 <fabiand at fedoraproject.org>
---
M src/ovirtnode/ovirtfunctions.py
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/09/44209/1
diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index 9f0efb3..9c9d1d7 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -845,7 +845,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 /config/" + filename + \
+ " " + 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/44209
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If26579837d4b91e96f785d79ec6ad07201735747
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
More information about the node-patches
mailing list