From: Perry Gagne pgagne@redhat.com
The arg to exec_cmd was evaluating to empty string.
Probably due to the order of operations of if ... else ...
Reworked it so it does what we expect
Signed-off-by: Perry Gagne pgagne@redhat.com --- lnst/Devices/TeamDevice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Devices/TeamDevice.py b/lnst/Devices/TeamDevice.py index 6be7841..f4e7101 100644 --- a/lnst/Devices/TeamDevice.py +++ b/lnst/Devices/TeamDevice.py @@ -47,8 +47,10 @@ class TeamDevice(MasterDevice):
def _create(self): teamd_json = json.dumps(self.config) - exec_cmd(f"teamd -r -d -c '{teamd_json}' -t {self.name}" - " -D" if self.dbus else "") + cmd = f"teamd -r -d -c '{teamd_json}' -t {self.name}" + if self.dbus: + cmd += " -D" + exec_cmd(cmd)
retry = 0 while self._nl_msg is None and retry < 5:
Tue, Apr 28, 2020 at 10:18:15PM CEST, pgagne@redhat.com wrote:
From: Perry Gagne pgagne@redhat.com
The arg to exec_cmd was evaluating to empty string.
Probably due to the order of operations of if ... else ...
Reworked it so it does what we expect
Signed-off-by: Perry Gagne pgagne@redhat.com
lnst/Devices/TeamDevice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Devices/TeamDevice.py b/lnst/Devices/TeamDevice.py index 6be7841..f4e7101 100644 --- a/lnst/Devices/TeamDevice.py +++ b/lnst/Devices/TeamDevice.py @@ -47,8 +47,10 @@ class TeamDevice(MasterDevice):
def _create(self): teamd_json = json.dumps(self.config)
exec_cmd(f"teamd -r -d -c '{teamd_json}' -t {self.name}"
" -D" if self.dbus else "")
cmd = f"teamd -r -d -c '{teamd_json}' -t {self.name}"
if self.dbus:
cmd += " -D"
exec_cmd(cmd) retry = 0 while self._nl_msg is None and retry < 5:
-- 2.21.1 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedorahos...
Acked-by: Jan Tluka jtluka@redhat.com
On Tue, Apr 28, 2020 at 04:18:15PM -0400, pgagne@redhat.com wrote:
From: Perry Gagne pgagne@redhat.com
The arg to exec_cmd was evaluating to empty string.
Probably due to the order of operations of if ... else ...
Reworked it so it does what we expect
Signed-off-by: Perry Gagne pgagne@redhat.com
lnst/Devices/TeamDevice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Devices/TeamDevice.py b/lnst/Devices/TeamDevice.py index 6be7841..f4e7101 100644 --- a/lnst/Devices/TeamDevice.py +++ b/lnst/Devices/TeamDevice.py @@ -47,8 +47,10 @@ class TeamDevice(MasterDevice):
def _create(self): teamd_json = json.dumps(self.config)
exec_cmd(f"teamd -r -d -c '{teamd_json}' -t {self.name}"
" -D" if self.dbus else "")
cmd = f"teamd -r -d -c '{teamd_json}' -t {self.name}"
if self.dbus:
cmd += " -D"
exec_cmd(cmd) retry = 0 while self._nl_msg is None and retry < 5:
-- 2.21.1 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedorahos...
pushed, thanks.
-Ondrej
lnst-developers@lists.fedorahosted.org