Fix error raising interface
[osm/devops.git] / juju-charms / layers / pingpong / reactive / pingpong.py
old mode 100644 (file)
new mode 100755 (executable)
index b5a5db9..7a91f89
@@ -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: