Change in vdsm[master]: Better logging for network restoration.

ibarkan at redhat.com ibarkan at redhat.com
Wed Feb 4 11:11:20 UTC 2015


Ido Barkan has uploaded a new change for review.

Change subject: Better logging for network restoration.
......................................................................

Better logging for network restoration.

This logging is done on the same log file of vdsm itself and it is now
clearer when restoration is done, if the restoration succeeded or not, and if
not, where it failed.

Change-Id: I8dc4be51ec3f8af210f2b4a0acdc52e372835239
Signed-off-by: Ido Barkan <ibarkan at redhat.com>
---
M vdsm/vdsm-restore-net-config
1 file changed, 13 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/06/37506/1

diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index 1d13bdd..7cd7bef 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -122,10 +122,20 @@
 
 
 def restore():
-    if config.get('vars', 'net_persistence') == 'unified':
-        unified_restoration()
+    unified = config.get('vars', 'net_persistence') == 'unified'
+    logging.info('starting network restoration.')
+    try:
+        if unified:
+            unified_restoration()
+        else:
+            ifcfg_restoration()
+    except Exception as e:
+        logging.error('%s restoration failed. error: %s',
+                      'unified' if unified else 'ifcfg',
+                      e)
+        raise
     else:
-        ifcfg_restoration()
+        logging.info('restoration completed successfully.')
 
 
 if __name__ == '__main__':


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dc4be51ec3f8af210f2b4a0acdc52e372835239
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>


More information about the vdsm-patches mailing list