summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-08-01 15:48:48 +0000
committerGerrit Code Review <review@openstack.org>2012-08-01 15:48:48 +0000
commita9432ce66e07b075c582000087850111abf262dc (patch)
tree3cb07cb9d0775e332d97cfd24ef5c03370dc153e
parentce638a66d0911d7a677dd5d12bd938018050f01b (diff)
parenteab5851b0b55c4230cc11460f9efc6b617ae2e68 (diff)
downloadnova-a9432ce66e07b075c582000087850111abf262dc.tar.gz
nova-a9432ce66e07b075c582000087850111abf262dc.tar.xz
nova-a9432ce66e07b075c582000087850111abf262dc.zip
Merge "Add check exit codes for vlans"
-rw-r--r--nova/network/linux_net.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
index 5c5802f2c..ee600dafb 100644
--- a/nova/network/linux_net.py
+++ b/nova/network/linux_net.py
@@ -989,16 +989,20 @@ class LinuxBridgeInterfaceDriver(LinuxNetInterfaceDriver):
LOG.debug(_('Starting VLAN inteface %s'), interface)
_execute('ip', 'link', 'add', 'link', bridge_interface,
'name', interface, 'type', 'vlan',
- 'id', vlan_num, run_as_root=True)
+ 'id', vlan_num, run_as_root=True,
+ check_exit_code=[0, 2, 254])
# (danwent) the bridge will inherit this address, so we want to
# make sure it is the value set from the NetworkManager
if mac_address:
_execute('ip', 'link', 'set', interface, 'address',
- mac_address, run_as_root=True)
- _execute('ip', 'link', 'set', interface, 'up', run_as_root=True)
+ mac_address, run_as_root=True,
+ check_exit_code=[0, 2, 254])
+ _execute('ip', 'link', 'set', interface, 'up', run_as_root=True,
+ check_exit_code=[0, 2, 254])
if FLAGS.network_device_mtu:
_execute('ip', 'link', 'set', interface, 'mtu',
- FLAGS.network_device_mtu, run_as_root=True)
+ FLAGS.network_device_mtu, run_as_root=True,
+ check_exit_code=[0, 2, 254])
return interface
@classmethod