commit e6a5dd01ae7684ce5eb2e7e5265fc0f6cbb0ffdd Author: Artem Savkov asavkov@redhat.com Date: Fri Aug 8 13:01:01 2014 +0200
active-backup bonding primary option fix
Netdevice's id is alphanumeric, not just digits, so when calling get_mapped_device() this id shouldn't be converted to int. Otherwise a ValueError exception is raised:
CommandException: CommandException: Slave bondmaster: invalid literal for int() with base 10: 'eth1'
Signed-off-by: Artem Savkov asavkov@redhat.com Signed-off-by: Jiri Pirko jiri@resnulli.us
lnst/Slave/NetConfigDevice.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py index 4fa1b50..054d15a 100644 --- a/lnst/Slave/NetConfigDevice.py +++ b/lnst/Slave/NetConfigDevice.py @@ -103,7 +103,7 @@ class NetConfigDeviceBond(NetConfigDeviceGeneric): "primary" option is not direct value but it's index of netdevice. So take the appropriate name from config ''' - slave_dev = self._if_manager.get_mapped_device(int(value)) + slave_dev = self._if_manager.get_mapped_device(value) value = slave_dev.get_name() exec_cmd('echo "%s" > %s/%s' % (value, self._get_bond_dir(),
lnst-developers@lists.fedorahosted.org