diff options
| author | Jenkins <jenkins@review.openstack.org> | 2011-11-09 14:58:43 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2011-11-09 14:58:43 +0000 |
| commit | 7a0487d0006bb5c8a903d3e2481ef06aebfc47ed (patch) | |
| tree | 3b1beb6c820f5c25ca928feea176949b1f8b10de | |
| parent | 93c02408754e7cec274c6d2580bc04f5e333eade (diff) | |
| parent | 2463d9d185f13647d51b77f9e37a7b1e5754ddb7 (diff) | |
| download | nova-7a0487d0006bb5c8a903d3e2481ef06aebfc47ed.tar.gz nova-7a0487d0006bb5c8a903d3e2481ef06aebfc47ed.tar.xz nova-7a0487d0006bb5c8a903d3e2481ef06aebfc47ed.zip | |
Merge "Remove nova dependency on vconfig on Linux."
| -rwxr-xr-x | nova/network/linux_net.py | 7 | ||||
| -rwxr-xr-x | tools/clean-vlans | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py index 46d520ade..099842979 100755 --- a/nova/network/linux_net.py +++ b/nova/network/linux_net.py @@ -918,10 +918,9 @@ class LinuxBridgeInterfaceDriver(LinuxNetInterfaceDriver): interface = 'vlan%s' % vlan_num if not _device_exists(interface): LOG.debug(_('Starting VLAN inteface %s'), interface) - _execute('vconfig', 'set_name_type', - 'VLAN_PLUS_VID_NO_PAD', run_as_root=True) - _execute('vconfig', 'add', bridge_interface, - vlan_num, run_as_root=True) + _execute('ip', 'link', 'add', 'link', bridge_interface, + 'name', interface, 'type', 'vlan', + 'id', vlan_num, run_as_root=True) # (danwent) the bridge will inherit this address, so we want to # make sure it is the value set from the NetworkManager if mac_address: diff --git a/tools/clean-vlans b/tools/clean-vlans index a26ad86ad..284e5dc57 100755 --- a/tools/clean-vlans +++ b/tools/clean-vlans @@ -22,4 +22,4 @@ export LC_ALL=C sudo ifconfig -a | grep br | grep -v bridge | cut -f1 -d" " | xargs -n1 -ifoo ifconfig foo down sudo ifconfig -a | grep br | grep -v bridge | cut -f1 -d" " | xargs -n1 -ifoo brctl delbr foo sudo ifconfig -a | grep vlan | cut -f1 -d" " | xargs -n1 -ifoo ifconfig foo down -sudo ifconfig -a | grep vlan | cut -f1 -d" " | xargs -n1 -ifoo vconfig rem foo +sudo ifconfig -a | grep vlan | cut -f1 -d" " | xargs -n1 -ifoo ip link del foo |
