Skip to content
Snippets Groups Projects
Commit 1f9ce570 authored by israelad's avatar israelad
Browse files

Fix error raising interface


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: default avatarAdam Israel <adam.israel@canonical.com>
parent 43e0c967
No related branches found
No related tags found
No related merge requests found
......@@ -63,16 +63,16 @@ def start():
remove_flag('actions.start')
return
# Attempt to raise the non-mgmt interface, but ignore failures if
# the interface is already up.
try:
cmd = "sudo timeout 30 /sbin/ifup eth1"
cmd = "sudo timeout 30 /sbin/ifup eth1"
result, err = charms.sshproxy._run(cmd)
except Exception as e:
action_fail('command failed: {}, errors: {}'.format(e, e.output))
remove_flag('actions.start')
return
pass
try:
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment