list_nics vlan tagging support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
quantum-gateway (Juju Charms Collection) |
Fix Released
|
Medium
|
Liam Young |
Bug Description
When I attempt to use a VLAN tagged interface for juju value 'flat-interface' in charm nova-compute I get the below failure in quantum-gateway:
2014-05-06 14:35:04 INFO juju-log Wrote template /etc/neutron/
2014-05-06 14:35:04 INFO config-changed Device "eth2.3397@eth2" does not exist.
2014-05-06 14:35:04 INFO config-changed Traceback (most recent call last):
2014-05-06 14:35:04 INFO config-changed File "/var/lib/
2014-05-06 14:35:04 INFO config-changed hooks.execute(
2014-05-06 14:35:04 INFO config-changed File "/var/lib/
2014-05-06 14:35:04 INFO config-changed self._hooks[
2014-05-06 14:35:04 INFO config-changed File "/var/lib/
2014-05-06 14:35:04 INFO config-changed f(*args)
2014-05-06 14:35:04 INFO config-changed File "/var/lib/
2014-05-06 14:35:04 INFO config-changed CONFIGS.write_all()
2014-05-06 14:35:04 INFO config-changed File "/var/lib/
2014-05-06 14:35:04 INFO config-changed [self.write(k) for k in self.templates.
2014-05-06 14:35:04 INFO config-changed File "/var/lib/
2014-05-06 14:35:04 INFO config-changed _out = self.render(
2014-05-06 14:35:04 INFO config-changed File "/var/lib/
2014-05-06 14:35:04 INFO config-changed ctxt = self.templates[
2014-05-06 14:35:04 INFO config-changed File "/var/lib/
2014-05-06 14:35:04 INFO config-changed _ctxt = context()
2014-05-06 14:35:04 INFO config-changed File "/var/lib/
2014-05-06 14:35:04 INFO config-changed hwaddrs[
2014-05-06 14:35:04 INFO config-changed File "/var/lib/
2014-05-06 14:35:04 INFO config-changed ip_output = subprocess.
2014-05-06 14:35:04 INFO config-changed File "/usr/lib/
2014-05-06 14:35:04 INFO config-changed raise CalledProcessEr
2014-05-06 14:35:04 INFO config-changed subprocess.
looking Inside hooks/charmhelp
def list_nics(
'''Return a list of nics of given type(s)'''
if isinstance(
int_types = [nic_type]
else:
int_types = nic_type
interfaces = []
for int_type in int_types:
cmd = ['ip', 'addr', 'show', 'label', int_type + '*']
ip_output = subprocess.
ip_output = (line for line in ip_output if line)
for line in ip_output:
if line.split(
return interfaces
I can see we are splitting on ':' and don't consider that an '@' maybe present so our return looks like this:
ubuntu@
2: eth0: <BROADCAST,
link/ether b8:ca:3a:6c:87:5c brd ff:ff:ff:ff:ff:ff
3: eth1: <NO-CARRIER,
link/ether b8:ca:3a:6c:87:5d brd ff:ff:ff:ff:ff:ff
4: eth2: <NO-CARRIER,
link/ether b8:ca:3a:6c:87:58 brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,
link/ether b8:ca:3a:6c:87:5a brd ff:ff:ff:ff:ff:ff
12: eth2.3397@eth2: <NO-CARRIER,
link/ether b8:ca:3a:6c:87:58 brd ff:ff:ff:ff:ff:ff
inet 172.27.192.37/23 brd 172.27.193.255 scope global eth2.3397
valid_lft forever preferred_lft forever
13: eth2.2803@eth2: <NO-CARRIER,
link/ether b8:ca:3a:6c:87:58 brd ff:ff:ff:ff:ff:ff
inet 0.0.0.0/24 brd 46.37.172.255 scope global eth2.2803
valid_lft forever preferred_lft forever
14: eth2.3104@eth2: <NO-CARRIER,
link/ether b8:ca:3a:6c:87:58 brd ff:ff:ff:ff:ff:ff
inet 172.28.196.87/25 brd 172.28.196.127 scope global eth2.3104
valid_lft forever preferred_lft forever
ubuntu@
If we then try and use this returned value like the below we get the error found in the juju log:
ubuntu@wqjxc:~$ ip -o -0 addr show eth2.3397\@eth2
Device "eth2.3397@eth2" does not exist.
However if we strip from the '@' instead of the ':' it would look like the below.
ubuntu@wqjxc:~$ ip -o -0 addr show eth2.3397
13: eth2.3397@eth2: <NO-CARRIER,
--The interface files looks like this--
auto eth2.3397
source /etc/network/
--The eth2.3397.config file looks like this--
iface eth2.3397 inet static
address 172.27.192.37
netmask 255.255.254.0
Related branches
- Liam Young (community): Disapprove
-
Diff: 104 lines (+20/-9)3 files modifiedhooks/charmhelpers/contrib/network/ufw.py (+8/-3)
hooks/charmhelpers/core/host.py (+1/-1)
hooks/charmhelpers/core/sysctl.py (+11/-5)
- OpenStack Charmers: Pending requested
-
Diff: 104 lines (+20/-9)3 files modifiedhooks/charmhelpers/contrib/network/ufw.py (+8/-3)
hooks/charmhelpers/core/host.py (+1/-1)
hooks/charmhelpers/core/sysctl.py (+11/-5)
Changed in quantum-gateway (Juju Charms Collection): | |
assignee: | nobody → Liam Young (gnuoy) |
Changed in quantum-gateway (Juju Charms Collection): | |
importance: | Undecided → Medium |
status: | New → Triaged |
tags: | added: openstack |
Changed in quantum-gateway (Juju Charms Collection): | |
status: | Triaged → Fix Released |
This is due to a bug in charm-helpers/ code/host. py which falsely assumes that only bond interfaces have VLANs. I've proposed a merge into charm-helpers trunk to fix this: https:/ /code.launchpad .net/~paulgear/ charm-helpers/ charm-helpers/ +merge/ 247378