Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: utils: replace order of import for persist/unpersist ......................................................................
utils: replace order of import for persist/unpersist
Preferable use the new ovirt-node Config class for persist/unpersist commands. The previous persist/unpersist provider uses /tmp/ovirt.log and might affect the vdsm start as missing ownership of file.
Change-Id: I51571693d2ff145c1b72b47e28c5c2f09b15acb7 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1274063 Signed-off-by: Douglas Schilling Landgraf dougsland@redhat.com --- M lib/vdsm/utils.py 1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/47829/1
diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py index 31d8529..bcd7cff 100644 --- a/lib/vdsm/utils.py +++ b/lib/vdsm/utils.py @@ -59,15 +59,15 @@ from . import constants
try: - # If failing to import old code, then try importing the legacy code - from ovirtnode import ovirtfunctions - persist = ovirtfunctions.ovirt_store_config - unpersist = ovirtfunctions.remove_config + from ovirt.node.utils.fs import Config + persist = Config().persist + unpersist = Config().unpersist except ImportError: try: - from ovirt.node.utils.fs import Config - persist = Config().persist - unpersist = Config().unpersist + # If failing to import old code, then try importing the legacy code + from ovirtnode import ovirtfunctions + persist = ovirtfunctions.ovirt_store_config + unpersist = ovirtfunctions.remove_config except ImportError: persist = lambda name: None unpersist = lambda name: None