From 1f9ce5700dcc29fd6dffc77bf12afde47d5e1d29 Mon Sep 17 00:00:00 2001 From: Adam Israel Date: Mon, 16 Oct 2017 14:46:29 -0400 Subject: [PATCH] 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: Adam Israel --- juju-charms/layers/pingpong/reactive/pingpong.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 juju-charms/layers/pingpong/reactive/pingpong.py diff --git a/juju-charms/layers/pingpong/reactive/pingpong.py b/juju-charms/layers/pingpong/reactive/pingpong.py old mode 100644 new mode 100755 index b5a5db96..7a91f89b --- a/juju-charms/layers/pingpong/reactive/pingpong.py +++ b/juju-charms/layers/pingpong/reactive/pingpong.py @@ -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: -- 2.25.1