Change in vdsm[master]: netconf/ifcfg: remove only backup files
dougsland at redhat.com
dougsland at redhat.com
Wed May 8 19:45:18 UTC 2013
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: netconf/ifcfg: remove only backup files
......................................................................
netconf/ifcfg: remove only backup files
clearBackups() removes the entire directory /var/lib/vdsm/netconfback/.
Because of that, TPS test (rpm -V vdsm) has failed.
This patch, will remove all files/directoies inside /var/lib/vdsm/netconfback/
and keep this directory.
Change-Id: Ie0144aef836011f5f3abf35086d349e25ca83683
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=958009
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M vdsm/netconf/ifcfg.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/14599/1
diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
index e25f536..03be24c 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/netconf/ifcfg.py
@@ -455,7 +455,11 @@
@classmethod
def clearBackups(cls):
""" Clear backup files """
- shutil.rmtree(netinfo.NET_CONF_BACK_DIR, ignore_errors=True)
+ for f in glob.glob(netinfo.NET_CONF_BACK_DIR + "*"):
+ if os.path.isdir(f):
+ shutil.rmtree(f)
+ else:
+ os.remove(f)
@classmethod
def ifcfgPorts(cls, network):
--
To view, visit http://gerrit.ovirt.org/14599
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0144aef836011f5f3abf35086d349e25ca83683
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
More information about the vdsm-patches
mailing list