Hello Douglas Schilling Landgraf,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/37016
to review the following change.
Change subject: net config: make sure ifcfg files are not persisted on node
......................................................................
net config: make sure ifcfg files are not persisted on node
When setting up networking, a multitude of ifcfg files may be modified.
If we are using the (default) 'unified' persistence mode, we expect that
none of these modification is to be persisted for the next boot.
However already-persisted ifcfg files would; unpersisted files won't,
which lead to the inconsistent state reported in the bug.
In this patch we make sure that none of our changes to ifcfg files is to
be persisted.
Change-Id: Ia61b2385ce0bf44a67f627caf5b73b68992349fd
Bug-Url: https://bugzilla.redhat.com/1165203
Signed-off-by: Dan Kenigsberg <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/36985
Reviewed-by: Douglas Schilling Landgraf <[email protected]>
Tested-by: Douglas Schilling Landgraf <[email protected]>
---
M vdsm/network/configurators/ifcfg.py
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/16/37016/1
diff --git a/vdsm/network/configurators/ifcfg.py
b/vdsm/network/configurators/ifcfg.py
index 5dbe9c1..87fd849 100644
--- a/vdsm/network/configurators/ifcfg.py
+++ b/vdsm/network/configurators/ifcfg.py
@@ -534,6 +534,11 @@
writes the new configuration and sets the specified access mode.'''
self._backup(fileName)
configuration = self.CONFFILE_HEADER + '\n' + configuration
+
+ # make sure that ifcfg files are never persisted by the node
+ if self.unifiedPersistence and utils.isOvirtNode():
+ node_fs.Config().unpersist(fileName)
+
logging.debug('Writing to file %s configuration:\n%s', fileName,
configuration)
with open(fileName, 'w') as confFile:
--
To view, visit http://gerrit.ovirt.org/37016
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia61b2385ce0bf44a67f627caf5b73b68992349fd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches