[node-patches] Change in ovirt-node[master]: config: Best effort for migration, relax on errors

fabiand at redhat.com fabiand at redhat.com
Wed Oct 7 14:03:40 UTC 2015


Fabian Deutsch has uploaded a new change for review.

Change subject: config: Best effort for migration, relax on errors
......................................................................

config: Best effort for migration, relax on errors

The migration of old config directives is sometimes failing.
With this patch we log but ignore those failures.

Change-Id: I49d65793ad18f57548a3b27fd483aaae3f0d35ea
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1224890
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/config/migrate.py
1 file changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/84/47084/1

diff --git a/src/ovirt/node/config/migrate.py b/src/ovirt/node/config/migrate.py
index c66d6a3..b30eec7 100644
--- a/src/ovirt/node/config/migrate.py
+++ b/src/ovirt/node/config/migrate.py
@@ -93,9 +93,16 @@
         if do_network:
             self.migrate_network_layout()
 
-        [getattr(self, func)() for func in dir(self) if
-            func.startswith("translate_") and not
-            func.endswith("all")]
+        funcs = [getattr(self, func) for func in dir(self) if
+                 func.startswith("translate_") and not
+                 func.endswith("all")]
+        for func in funcs:
+            try:
+                self.logger.debug("Calling %s" % func)
+                func()
+            except Exception as e:
+                self.logger.info("Failed to translate %s: %s" % (func, e),
+                                 exc_info=True)
 
     def translate_rsyslog(self):
         if self.__is_persisted("/etc/rsyslog.conf"):


-- 
To view, visit https://gerrit.ovirt.org/47084
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49d65793ad18f57548a3b27fd483aaae3f0d35ea
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>



More information about the node-patches mailing list