diff --git a/Makefile.am b/Makefile.am index 6bf34253..bfa5313f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,6 +61,7 @@ fpm -s dir -t rpm -n core \ -p core_$(PYTHON)_VERSION_ARCH.rpm \ -v $(PACKAGE_VERSION) \ --rpm-init scripts/core-daemon \ + -d "ethtool" \ -d "tcl" \ -d "tk" \ -d "procps-ng" \ @@ -84,6 +85,7 @@ fpm -s dir -t deb -n core \ -p core_$(PYTHON)_VERSION_ARCH.deb \ -v $(PACKAGE_VERSION) \ --deb-systemd scripts/core-daemon.service \ + -d "ethtool" \ -d "tcl" \ -d "tk" \ -d "libtk-img" \ diff --git a/daemon/core/constants.py.in b/daemon/core/constants.py.in index 0cb3750e..a84a375a 100644 --- a/daemon/core/constants.py.in +++ b/daemon/core/constants.py.in @@ -20,6 +20,7 @@ VCMD_BIN = which("vcmd") BRCTL_BIN = which("brctl") SYSCTL_BIN = which("sysctl") IP_BIN = which("ip") +ETHTOOL_BIN = which("ethtool") TC_BIN = which("tc") EBTABLES_BIN = which("ebtables") MOUNT_BIN = which("mount") diff --git a/daemon/core/nodes/base.py b/daemon/core/nodes/base.py index 05b45b4c..555eda78 100644 --- a/daemon/core/nodes/base.py +++ b/daemon/core/nodes/base.py @@ -668,6 +668,7 @@ class CoreNode(CoreNodeBase): if self.up: utils.check_cmd([constants.IP_BIN, "link", "set", veth.name, "netns", str(self.pid)]) self.check_cmd([constants.IP_BIN, "link", "set", veth.name, "name", ifname]) + self.check_cmd([constants.ETHTOOL_BIN, "-K", ifname, "rx", "off", "tx", "off"]) veth.name = ifname diff --git a/daemon/core/nodes/client.py b/daemon/core/nodes/client.py index 8530804b..d2d6cc4d 100644 --- a/daemon/core/nodes/client.py +++ b/daemon/core/nodes/client.py @@ -73,7 +73,7 @@ class VnodeClient(object): # run command, return process when not waiting cmd = self._cmd_args() + args - logging.info("cmd wait(%s): %s", wait, cmd) + logging.debug("cmd wait(%s): %s", wait, cmd) p = Popen(cmd, stdout=PIPE, stderr=PIPE) if not wait: return 0 @@ -124,7 +124,7 @@ class VnodeClient(object): self._verify_connection() args = utils.split_args(args) cmd = self._cmd_args() + args - logging.info("popen: %s", cmd) + logging.debug("popen: %s", cmd) p = Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE) return p, p.stdin, p.stdout, p.stderr @@ -157,7 +157,7 @@ class VnodeClient(object): # run command, return process when not waiting args = utils.split_args(args) cmd = self._cmd_args() + args - logging.info("redircmd: %s", cmd) + logging.debug("redircmd: %s", cmd) p = Popen(cmd, stdin=infd, stdout=outfd, stderr=errfd) if not wait: diff --git a/daemon/core/utils.py b/daemon/core/utils.py index 5b18f230..ac76e693 100644 --- a/daemon/core/utils.py +++ b/daemon/core/utils.py @@ -148,9 +148,7 @@ def split_args(args): :return: shell-like syntax list :rtype: list """ - logging.info("split args: %s - %s", args, type(args)) if isinstance(args, basestring): - logging.info("splitting args") args = shlex.split(args) return args