Don't fail if there's an error raising the interface. I'm seeing this
happen because the interface is already up.
Signed-off-by: Adam Israel <adam.israel@canonical.com>
remove_flag('actions.start')
return
remove_flag('actions.start')
return
+ # Attempt to raise the non-mgmt interface, but ignore failures if
+ # the interface is already up.
- cmd = "sudo timeout 30 /sbin/ifup eth1"
+ cmd = "sudo timeout 30 /sbin/ifup eth1"
result, err = charms.sshproxy._run(cmd)
except Exception as e:
result, err = charms.sshproxy._run(cmd)
except Exception as e:
- action_fail('command failed: {}, errors: {}'.format(e, e.output))
- remove_flag('actions.start')
- return
- cmd = "sudo timeout 30 /usr/bin/systemctl start {}". \
+ cmd = "sudo timeout 30 /usr/bin/systemctl start {}". \
format(cfg['mode'])
result, err = charms.sshproxy._run(cmd)
except Exception as e:
format(cfg['mode'])
result, err = charms.sshproxy._run(cmd)
except Exception as e: