Fri, Aug 07, 2015 at 03:43:51PM CEST, olichtne(a)redhat.com wrote:
On Thu, Aug 06, 2015 at 02:56:20PM +0200, Jan Tluka wrote:
> This patch fixes bug when more devices with mac address
> 00:00:00:00:00:00 is present when recipe starts (this might happen if a
> user works with tunneling devices that usually have this mac address).
> As result map_if_by_hwaddr returns more than one device and device
> cannot be mapped. The solution is to map loopback interface based on
> mac address and driver.
>
> Fixes issue #133.
>
> Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
> ---
> lnst/Controller/Machine.py | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py
> index c360e6c..7456fdf 100644
> --- a/lnst/Controller/Machine.py
> +++ b/lnst/Controller/Machine.py
> @@ -792,12 +792,16 @@ class LoopbackInterface(Interface):
>
> def configure(self):
> self._hwaddr = '00:00:00:00:00:00'
> + self._driver = 'loopback'
> +
> if self._netns:
> phys_devs = self._machine._rpc_call_to_netns(self._netns,
> - "map_if_by_hwaddr", self._id,
self._hwaddr)
> + "map_if_by_params", self._id,
> + { 'driver': self._driver })
In the commit description you say that you map loopback devices based on
mac address and drived, but I only see you using the driver parameter
here. Is this intentional or a mistake?
You're right, this was not intentional. Will send updated series. Thanks
for catching this. Even that I ran regression tests this stupid bug
masked the other issues in the patches.
> else:
> - phys_devs = self._machine._rpc_call("map_if_by_hwaddr",
> - self._id, self._hwaddr)
> + phys_devs = self._machine._rpc_call("map_if_by_params",
> + self._id,
> + { 'driver': self._driver })
>
> if len(phys_devs) == 1:
> self.set_devname(phys_devs[0]["name"])
> --
> 2.1.0
>
> _______________________________________________
> LNST-developers mailing list
> LNST-developers(a)lists.fedorahosted.org
>
https://lists.fedorahosted.org/mailman/listinfo/lnst-developers