[node-patches] Change in ovirt-node[ovirt-3.6]: utils: Fix missing namespace

fabiand at redhat.com fabiand at redhat.com
Tue Nov 3 15:36:27 UTC 2015


Fabian Deutsch has uploaded a new change for review.

Change subject: utils: Fix missing namespace
......................................................................

utils: Fix missing namespace

Change-Id: Ie986600db46b95cd4fcf0f3d76753c84f083941f
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1233106
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-node-rebuild-initramfs
M src/ovirt/node/utils/system.py
2 files changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/26/48026/1

diff --git a/scripts/ovirt-node-rebuild-initramfs b/scripts/ovirt-node-rebuild-initramfs
index a7a9871..e25ef3c 100755
--- a/scripts/ovirt-node-rebuild-initramfs
+++ b/scripts/ovirt-node-rebuild-initramfs
@@ -23,7 +23,7 @@
 logging.basicConfig(level=logging.INFO,
                     format='%(levelname)s - %(message)s')
 
-from ovirt.node.utils import system
+from ovirt.node.utils import system, process
 
 
 if __name__ == "__main__":
@@ -31,7 +31,7 @@
 
     initramfs = system.Initramfs()
     try:
-        kver = check_output(["uname", "-r"])
+        kver = process.check_output(["uname", "-r"])
         initramfs.rebuild(kver)
     except:
         log.exception("Initramfs regeneration failed")
diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index e81171f..a064416 100755
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -38,7 +38,7 @@
 from ovirt.node import base, utils
 from ovirt.node.utils import process, parse_varfile
 from ovirt.node.utils.fs import File
-from ovirt.node.utils.process import check_output, check_call
+from ovirt.node.utils.process import check_call
 
 
 LOGGER = logging.getLogger(__name__)
@@ -356,11 +356,13 @@
 
 
 @contextmanager
-def mounted_boot(source="/liveos"):
+def mounted_boot(source=None):
     """Used to mount /boot
     Normally /boot is from the /liveos mountpoint, but sometimes it's
     elsewhere, thus we have source
     """
+
+    source = source or "/liveos"
 
     LOGGER.info("Mounting %r to /boot" % source)
 
@@ -1356,7 +1358,7 @@
                     "dracut", "--kver", kver, new_initrd]
             LOGGER.debug("Calling: %s" % argv)
 
-            rd_stdout = check_output(argv, stderr=process.STDOUT)
+            rd_stdout = process.check_output(argv, stderr=process.STDOUT)
         except:
             LOGGER.warn("dracut failed to generate the initramfs")
             LOGGER.warn("dracut output: %s" % rd_stdout)


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

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



More information about the node-patches mailing list