From d1364c888d91f151d7dca9c59da77c4556065769 Mon Sep 17 00:00:00 2001 From: Kevin Larson Date: Thu, 26 Jul 2018 12:25:12 -0700 Subject: [PATCH 1/2] Updated ip commands to use constants.IP_BIN --- daemon/core/netns/vif.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/core/netns/vif.py b/daemon/core/netns/vif.py index 2e5b66fc..5a6653e4 100644 --- a/daemon/core/netns/vif.py +++ b/daemon/core/netns/vif.py @@ -274,7 +274,7 @@ class GreTap(PyCoreNetIf): if remoteip is None: raise ValueError, "missing remote IP required for GRE TAP device" - args = ["ip", "link", "add", self.localname, "type", "gretap", + args = [constants.IP_BIN, "link", "add", self.localname, "type", "gretap", "remote", str(remoteip)] if localip: args += ["local", str(localip)] @@ -283,7 +283,7 @@ class GreTap(PyCoreNetIf): if key: args += ["key", str(key)] utils.check_cmd(args) - args = ["ip", "link", "set", self.localname, "up"] + args = [constants.IP_BIN, "link", "set", self.localname, "up"] utils.check_cmd(args) self.up = True @@ -295,9 +295,9 @@ class GreTap(PyCoreNetIf): """ if self.localname: try: - args = ["ip", "link", "set", self.localname, "down"] + args = [constants.IP_BIN, "link", "set", self.localname, "down"] utils.check_cmd(args) - args = ["ip", "link", "del", self.localname] + args = [constants.IP_BIN, "link", "del", self.localname] utils.check_cmd(args) except CoreCommandError: logger.exception("error during shutdown") From 8009572fc05f3807878df8ee15e4e410e5fd685c Mon Sep 17 00:00:00 2001 From: "Blake J. Harnden" Date: Fri, 27 Jul 2018 16:10:47 -0700 Subject: [PATCH 2/2] fixed issue with corexml and loading hooks --- daemon/core/xml/corexml.py | 1 - 1 file changed, 1 deletion(-) diff --git a/daemon/core/xml/corexml.py b/daemon/core/xml/corexml.py index 394649be..f0513654 100644 --- a/daemon/core/xml/corexml.py +++ b/daemon/core/xml/corexml.py @@ -705,7 +705,6 @@ class CoreXmlReader(object): name = hook.get("name") state = hook.get("state") data = hook.text - self.session.add_state_hook() hook_type = "hook:%s" % state logger.info("reading hook: state(%s) name(%s)", state, name) self.session.set_hook(hook_type, file_name=name, source_name=None, data=data)