Mon, Nov 03, 2014 at 03:56:23PM CET, jpirko(a)redhat.com wrote:
Mon, Nov 03, 2014 at 03:03:35PM CET, olichtne(a)redhat.com wrote:
>From: Ondrej Lichtner <olichtne(a)redhat.com>
>
>When NM is running on a machine and lnst is using normal configuration
>the bond is created, NM sets it up which makes the configuration of the
>bonding mode fail. This patch makes sure that before configuring any
>options the device is down.
>
>Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
>---
> lnst/Slave/NetConfigDevice.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
>index 11f39d5..3816e0a 100644
>--- a/lnst/Slave/NetConfigDevice.py
>+++ b/lnst/Slave/NetConfigDevice.py
>@@ -107,6 +107,10 @@ class NetConfigDeviceBond(NetConfigDeviceGeneric):
> if not "options" in self._dev_config:
> return
> options = self._dev_config["options"]
>+
>+ #make sure that the device is down before configuring options
>+ exec_cmd('ip link set %s down' % self._dev_config["name"])
>+
you can race with nm here. Please note it here in comment and also note
that this is a workaround until nm is capable of setting NM_CONTROLLED=no for
device on fly. Thanks.
NM RH bugzilla 1114685
> for option, value in options:
> if option == "primary":
> '''
>--
>1.9.3
>
>_______________________________________________
>LNST-developers mailing list
>LNST-developers(a)lists.fedorahosted.org
>https://lists.fedorahosted.org/mailman/listinfo/lnst-developers
_______________________________________________
LNST-developers mailing list
LNST-developers(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/lnst-developers