Xenial Deploy fails when using /etc/network/interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Undecided
|
Unassigned | ||
curtin |
Invalid
|
High
|
Unassigned |
Bug Description
MAAS 2.2.2 Move from Curtin 505 to 532 breaks use of /etc/network/
Our OVS OpenStack charm modifies /etc/network/
We've deployed this charm in production at PCCW. PCCW updated their MAAS server and the charm no longer works.
in curtin 532, /etc/network/
Attaching charm code and juju-log file
john (g-john-p) wrote : | #1 |
Andres Rodriguez (andreserl) wrote : | #2 |
Curtin has changed the way how it does networking and it now tells cloud-init to do the networking. So whatever you used in late_commands is no longer going to work for configuring interfaces.
Changed in maas: | |
status: | New → Invalid |
Ryan Harper (raharper) wrote : | #3 |
Can you attach a working eni file? I'd like to capture what additional elements in eni you're using that aren't modeled in the network configuration in MAAS.
Changed in curtin: | |
importance: | Undecided → High |
status: | New → Incomplete |
john (g-john-p) wrote : | #4 |
I don't know what an eni file is. can you please give more instruction.
We are not using any late_commands. Everything is done using juju charms. please see our charms code.
Changed in curtin: | |
status: | Incomplete → New |
Andres Rodriguez (andreserl) wrote : | #5 |
@John,
Please provide the configuration steps you are doing to modify e/n/i, as well as provide the resulting one on a deployed machine.
That said, the quickest work around would be to revert curtin to the older version, which would allow you to continue to use your current configuration.
Ryan Harper (raharper) wrote : Re: [Bug 1732202] Re: Xenial Deploy fails when using /etc/network/interface | #6 |
Sorry,
If you can provide a copy of /etc/network/
/etc/network/
it is not broken.
Ryan
On Tue, Nov 14, 2017 at 11:26 AM, john <email address hidden> wrote:
> I don't know what an eni file is. can you please give more instruction.
> We are not using any late_commands. Everything is done using juju charms.
> please see our charms code.
>
> ** Changed in: curtin
> Status: Incomplete => New
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Xenial Deploy fails when using /etc/network/
>
> To manage notifications about this bug go to:
> https:/
>
Ryan Harper (raharper) wrote : | #7 |
2017-11-14 04:40:55 INFO install File
"/var/lib/
line 240, in <module>
2017-11-14 04:40:55 INFO install main()
2017-11-14 04:40:55 INFO install File
"/var/lib/
line 233, in main
2017-11-14 04:40:55 INFO install hooks.execute(
2017-11-14 04:40:55 INFO install File
"/var/lib/
line 715, in execute
2017-11-14 04:40:55 INFO install self._hooks[
2017-11-14 04:40:55 INFO install File
"/var/lib/
line 222, in install
2017-11-14 04:40:55 INFO install gw=config(
2017-11-14 04:40:55 INFO install File
"/var/lib/
line 68, in add_bridge
2017-11-14 04:40:55 INFO install read_only=False)
2017-11-14 04:40:55 INFO install File
"/var/lib/
line 93, in extract_net_config
2017-11-14 04:40:55 INFO install format(
2017-11-14 04:40:55 INFO install ValueError: eth1.10: Could not parse
needed iface params
Your charm only reads /etc/network/
However, to properly read all network config you need to combine:
/etc/network/
That code only works for eni (/etc/network/
also source additional configuration.
On Tue, Nov 14, 2017 at 11:39 AM, Ryan Harper <email address hidden>
wrote:
> Sorry,
>
> If you can provide a copy of /etc/network/
> /etc/network/
> it is not broken.
>
> Ryan
>
>
> On Tue, Nov 14, 2017 at 11:26 AM, john <email address hidden> wrote:
>
>> I don't know what an eni file is. can you please give more instruction.
>> We are not using any late_commands. Everything is done using juju
>> charms. please see our charms code.
>>
>> ** Changed in: curtin
>> Status: Incomplete => New
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https:/
>>
>> Title:
>> Xenial Deploy fails when using /etc/network/
>>
>> To manage notifications about this bug go to:
>> https:/
>>
>
>
john (g-john-p) wrote : | #8 |
- /etc/network/interfaces Edit (2.3 KiB, text/plain)
attaching working /etc/network/
john (g-john-p) wrote : | #9 |
I just added /etc/network/
/etc/network/
John Casey
CPlane Networks
Direct: 415-215-0854
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Ryan Harper
Sent: Tuesday, November 14, 2017 9:39 AM
To: John Casey <email address hidden>
Subject: Re: [Bug 1732202] Re: Xenial Deploy fails when using /etc/network/
Sorry,
If you can provide a copy of /etc/network/
/etc/network/
Ryan
On Tue, Nov 14, 2017 at 11:26 AM, john <email address hidden> wrote:
> I don't know what an eni file is. can you please give more instruction.
> We are not using any late_commands. Everything is done using juju charms.
> please see our charms code.
>
> ** Changed in: curtin
> Status: Incomplete => New
>
> --
> You received this bug notification because you are subscribed to the
> bug report.
> https:/
>
> Title:
> Xenial Deploy fails when using /etc/network/
>
> To manage notifications about this bug go to:
> https:/
>
--
You received this bug notification because you are subscribed to the bug report.
https:/
Title:
Xenial Deploy fails when using /etc/network/
Status in curtin:
New
Status in MAAS:
Invalid
Bug description:
MAAS 2.2.2 Move from Curtin 505 to 532 breaks use of
/etc/
Our OVS OpenStack charm modifies /etc/network/
We've deployed this charm in production at PCCW. PCCW updated their MAAS server and the charm no longer works.
in curtin 532, /etc/network/
definitions are in /etc/network/
Attaching charm code and juju-log file
To manage notifications about this bug go to:
https:/
john (g-john-p) wrote : | #10 |
/etc/network/
Ryan Harper (raharper) wrote : | #11 |
Thanks for the input file, do you have the original/backup file before it was modified?
/etc/network/
?
I'm interested in seeing the transformation that the charm is doing to the base configuration.
Changed in curtin: | |
status: | New → Incomplete |
Ryan Harper (raharper) wrote : | #12 |
> /etc/network/
On the older curtin, which wrote eni directly, the interfaces.d dir will be empty as you found.
With newer curtin, the network configuration is given to cloud-init to render and it will write out to /etc/network/
If the charm were to combine /etc/network/
I suspect, as a quick check, if you read in /etc/network/
Ryan Harper (raharper) wrote : | #13 |
https:/
On newer Ubuntu systems, the network configuration file may be generated by
cloud-init and written to /etc/network/
If present, use that, otherwise fallback to reading /etc/network/
Note, long term, this code needs to read /etc/network/
sourcedir directive in eni, search those directories for additional configurations
to capture all possible network configuration that's under control of ifupdown.
john (g-john-p) wrote : | #14 |
thanks Ryan. We will update our charms to incorporate this logic.
john (g-john-p) wrote : | #15 |
Hi Ryan,
We are now running into another issue. it seems that interface that are placed in /etc/network/
I believe ifup and ifdown look into eni. Is there a different set of commands to use when no using eni?
Changed in curtin: | |
status: | Incomplete → New |
john (g-john-p) wrote : | #16 |
Hi Ryan: here is more info. All of what I'm gong to share is different in curtin 532 vs 505. ( our charms are working perfectly in 505)
In our charm, we need to set the MTU and TSO, GSO, TRO, etc of each interface (see charm)
We’ve already made a fix to edit the /etc/network/
But now we need to ifdown/ifup the interfaces after we set the MTU etc.
We are now getting this error.
og Change request for mtu for interface eth1.10 = 9000
2017-11-16 03:50:57 INFO config-changed ifdown: interface eth1.10 not configured
2017-11-16 03:50:57 INFO config-changed
2017-11-16 03:50:57 INFO config-changed Set name-type for VLAN subsystem. Should be visible in /proc/net/
2017-11-16 03:50:57 INFO config-changed RTNETLINK answers: Invalid argument
2017-11-16 03:50:57 INFO config-changed RTNETLINK answers: Numerical result out of range
2017-11-16 03:50:57 INFO config-changed Failed to bring up eth1.10.
2017-11-16 03:50:57 INFO config-changed Traceback (most recent call last):
2017-11-16 03:50:57 INFO config-changed File "/var/lib/
2017-11-16 03:50:57 INFO config-changed main()
2017-11-16 03:50:57 INFO config-changed File "/var/lib/
2017-11-16 03:50:57 INFO config-changed hooks.execute(
2017-11-16 03:50:57 INFO config-changed File "/var/lib/
2017-11-16 03:50:57 INFO config-changed self._hooks[
2017-11-16 03:50:57 INFO config-changed File "/var/lib/
2017-11-16 03:50:57 INFO config-changed change_
2017-11-16 03:50:57 INFO config-changed File "/var/lib/
2017-11-16 03:50:57 INFO config-changed subprocess.
2017-11-16 03:50:57 INFO config-changed File "/usr/lib/
2017-11-16 03:50:57 INFO config-changed raise CalledProcessEr
2017-11-16 03:50:57 INFO config-changed subprocess.
When I go into the server and try to do an ifup/down manually I’m getting this error
eth1.10 no such interface
ubuntu@MACH4:~$ sudo -i
root@MACH4:~# ifdown eth1.10
ifdown: interface eth1.10 not configured
but it clearly shows it is
eth1.10 Link encap:Ethernet HWaddr 52:54:00:5a:57:aa
inet6 addr: fe80::5054:
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:120 errors:0 dropped:0 overruns:0 frame:0
TX packets:185 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:12139 (12.1 KB) TX bytes:21723 (21.7 KB)
We also just noticed that the ovs interface ...
john (g-john-p) wrote : | #17 |
Syslog http://
machine2-log http://
charm log http://
Ryan Harper (raharper) wrote : | #18 |
Can you attach a tar of /etc/network/ ?
That way I can see what ifupdown is consuming.
On Thu, Nov 16, 2017 at 2:04 AM, john <email address hidden> wrote:
> Hi Ryan: here is more info. All of what I'm gong to share is different
> in curtin 532 vs 505. ( our charms are working perfectly in 505)
>
>
> In our charm, we need to set the MTU and TSO, GSO, TRO, etc of each
> interface (see charm)
>
> We’ve already made a fix to edit the /etc/network/
> init.cfg file.
>
> But now we need to ifdown/ifup the interfaces after we set the MTU etc.
>
> We are now getting this error.
>
> og Change request for mtu for interface eth1.10 = 9000
> 2017-11-16 03:50:57 INFO config-changed ifdown: interface eth1.10 not
> configured
> 2017-11-16 03:50:57 INFO config-changed
> 2017-11-16 03:50:57 INFO config-changed Set name-type for VLAN subsystem.
> Should be visible in /proc/net/
> 2017-11-16 03:50:57 INFO config-changed RTNETLINK answers: Invalid argument
> 2017-11-16 03:50:57 INFO config-changed RTNETLINK answers: Numerical
> result out of range
> 2017-11-16 03:50:57 INFO config-changed Failed to bring up eth1.10.
> 2017-11-16 03:50:57 INFO config-changed Traceback (most recent call last):
> 2017-11-16 03:50:57 INFO config-changed File "/var/lib/
> neutron-
> <module>
> 2017-11-16 03:50:57 INFO config-changed main()
> 2017-11-16 03:50:57 INFO config-changed File "/var/lib/
> neutron-
> main
> 2017-11-16 03:50:57 INFO config-changed hooks.execute(
> 2017-11-16 03:50:57 INFO config-changed File "/var/lib/
> neutron-
> line 715, in execute
> 2017-11-16 03:50:57 INFO config-changed self._hooks[
> 2017-11-16 03:50:57 INFO config-changed File "/var/lib/
> neutron-
> config_changed
> 2017-11-16 03:50:57 INFO config-changed change_
> 'mtu', interface[1])
> 2017-11-16 03:50:57 INFO config-changed File "/var/lib/
> neutron-
> change_iface_config
> 2017-11-16 03:50:57 INFO config-changed subprocess.
> 2017-11-16 03:50:57 INFO config-changed File "/usr/lib/
> line 541, in check_call
> 2017-11-16 03:50:57 INFO config-changed raise
> CalledProcessEr
> 2017-11-16 03:50:57 INFO config-changed subprocess.
> Command '['ifup', u'eth1.10']' returned non-zero exit st
>
> When I go into the server and try to do an ifup/down manually I’m getting
> this error
> eth1.10 no such interface
>
> ubuntu@MACH4:~$ sudo -i
> root@MACH4:~# ifdown eth1.10
> ifdown: interface eth1.10 not configured
>
> but it clearly shows it is
>
> eth1.10 Link encap:Ethernet HWaddr 52:54:00:5a:57:aa
> inet6 addr: fe80::5054:
> UP BROADCAST RUNNING MULTICAST MTU:1500 Met...
john (g-john-p) wrote : | #19 |
john (g-john-p) wrote : | #20 |
- curtin505 /etc/network/* Edit (8.9 KiB, application/octet-stream)
Attaching tar of /etc/network/* from curtin505 what works for your comparison.
Ryan Harper (raharper) wrote : | #21 |
Thanks for the configuration files.
505 and 532 pick different vlan numbers, but I think the section that matters
most is the br-ext and it's port (eth1.XX). In 532 it's eth1.10 and in 505 it's eth1.15.
IN both cases, the config looks like this:
# Interface eth1.10
allow-br-ext eth1.10
iface eth1.10 inet manual
<config>
# Bridge br-ext
auto br-ext
allow-ovs br-ext
iface br-ext inet static
<config>
the br-ext port is not marked 'auto' or 'allow-auto'; which means ifupdown is going to ignore that unless you explicitly allow it like so:
ifup --allow br-ext eth1.10
ifdown --allow br-ext eth1.10
Ignore the vlan WARNING outputs (the scripts are just noisy)
root@x1:~# cat /etc/network/
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/
# network: {config: disabled}
auto lo
iface lo inet loopback
dns-nameservers 10.1.0.1
dns-search maas
auto eth0
iface eth0 inet static
address 10.1.0.20/24
dns-nameservers 10.1.0.1
gateway 10.1.0.1
mtu 1500
auto eth1
iface eth1 inet manual
mtu 1500
auto eth2
iface eth2 inet manual
mtu 1500
auto eth2.11
iface eth2.11 inet static
address 192.168.64.14/24
dns-nameservers 192.168.64.2
mtu 1500
vlan-raw-device eth2
vlan_id 11
post-up route add -net 192.168.61.0 netmask 255.255.255.0 gw 192.168.64.1 metric 0 || true
pre-down route del -net 192.168.61.0 netmask 255.255.255.0 gw 192.168.64.1 metric 0 || true
# Interface eth1.10
allow-br-ext eth1.10
iface eth1.10 inet manual
ovs_type OVSPort
ovs_bridge br-ext
vlan-raw-device eth1
dns-nameservers 192.168.63.2
mtu 9000
bridge_name br-ext
vlan_id 10
# Bridge br-ext
auto br-ext
allow-ovs br-ext
iface br-ext inet static
address 192.168.63.14
netmask 255.255.255.0
cp_gateway 192.168.63.1
ovs_type OVSBridge
ovs_ports eth1.10
bridge_ports eth1.10
root@x1:~# ifquery --list
lo
eth0
eth1
eth2
eth2.11
br-ext
root@x1:~# ifquery --list --allow br-ext
eth1.10
root@x1:~# ifdown eth1.10
ifdown: interface eth1.10 not configured
root@x1:~# ifup eth1.10 --allow br-ext
WARNING: Could not open /proc/net/
Set name-type for VLAN subsystem. Should be visible in /proc/net/
root@x1:~# ifdown eth1.10 --allow br-ext
WARNING: Could not open /proc/net/
Removed VLAN -:eth1.10:-
I've not looked at the rest of the charm code but it's possible that needs to use the --allow when using ifup/down calls.
john (g-john-p) wrote : | #22 |
Yes we know the configurations are different. these are two different test environments. We updated one of our tests labs first and found the problems. at the time both were working under 505. I'm providing this only as a reference. The problems are not to do with these difference.
Ryan Harper (raharper) wrote : | #23 |
On Fri, Nov 17, 2017 at 11:33 AM, john <email address hidden> wrote:
> Yes we know the configurations are different. these are two different
> test environments. We updated one of our tests labs first and found the
> problems. at the time both were working under 505. I'm providing
> this only as a reference. The problems are not to do with these
> difference.
>
Correct; in both cases, if you want to interact with any of the interfaces
that are not marked 'auto'; then your commands need to append --allow
<class>
In particular, the error reported was an interface that was part of br-ext,
so
it would need ifup --allow br-ext eth1.10
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Xenial Deploy fails when using /etc/network/
>
> To manage notifications about this bug go to:
> https:/
>
john (g-john-p) wrote : | #24 |
that did not work.
root@MACH4:
root@MACH4:
ifdown: interface eth1.10 not configured
Also, BR-EXT and ETH1.10 should have the same MAC address. This will cause problems.
john (g-john-p) wrote : | #25 |
BR-EXT enslaves ETH1.10 within OVS. These two must have the same MAC address and they don't in the curtin 532 case. maybe the first issue will fix this issue.
root@MACH4:
eth1.10 Link encap:Ethernet HWaddr 52:54:00:5a:57:aa
inet6 addr: fe80::5054:
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5749 errors:0 dropped:0 overruns:0 frame:0
TX packets:4253 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:500579 (500.5 KB) TX bytes:324848 (324.8 KB)
root@MACH4:
br-ext Link encap:Ethernet HWaddr 3a:31:6b:39:16:40
inet addr:192.168.63.14 Bcast:192.
inet6 addr: fe80::3831:
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:0 (0.0 B) TX bytes:648 (648.0 B)
Ryan Harper (raharper) wrote : | #26 |
On Fri, Nov 17, 2017 at 1:18 PM, john <email address hidden> wrote:
> that did not work.
>
> root@MACH4:
> root@MACH4:
> ifdown: interface eth1.10 not configured
>
that's because it's not up (from an ifupdown perspective; it keeps state in
/run/network/);
ifup --allow br-ext eth1.10; then you can down it.
It's not clear to me (without more reading of your code) why it needs to go
down.
MTU changes do not require up/downing of interfaces.
>
> Also, BR-EXT and ETH1.10 should have the same MAC address. This will
> cause problems.
>
Let me look at the configs.
There are no hwaddress configurations in the eni file, so I suspect that
something else is going on w.r.t the br-ext bridge configuration.
The current state of /etc/network/
isn't complete (it's missing the tun and the br-tun) configuration.
It appears to me that the charm configuration is iterative, adding one
change at a time; and if during one step, the ifup/ifdown command fails
then it likely prevents the rest of the config from being generated and
applied.
I don't have ovs_bridge installed, but just using regular linux bridge
I put in bridge_ports eth1.10 in the br-ext configuration, and I see when
br-ext comes up, it creates eth1.10 vlan, and adds to the br-ext bridge
at which time the bridge gets the eth1.10 mac address.
root@x1:~# ifdown -v br-ext
Parsing file /etc/network/
Configuring interface br-ext=br-ext (inet)
/bin/run-parts --verbose /etc/network/
run-parts: executing /etc/network/
run-parts: executing /etc/network/
/bin/ip addr del 192.168.
br-ext label br-ext
/bin/ip link set dev br-ext down
/bin/run-parts --verbose /etc/network/
run-parts: executing /etc/network/
WARNING: Could not open /proc/net/
8021q module, or maybe you are not using PROCFS??
Removed VLAN -:eth1.10:-
run-parts: executing /etc/network/
+ [ inet = meta ]
+ BOND_PARAMS=
+ [ -f /sys/class/
+ [ ! -f /sys/class/
+ exit
run-parts: executing /etc/network/
root@x1:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:16:3e:17:e8:1a
inet addr:10.1.0.20 Bcast:10.1.0.255 Mask:255.255.255.0
inet6 addr: fe80::216:
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1094 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:163351 (163.3 KB) TX bytes:1332 (1.3 KB)
eth1 Link encap:Ethernet HWaddr 00:16:3e:c0:eb:ff
inet6 addr: fe80::216:
UP BROADCAST RUNNING MULTICAST MTU:9000 Metric:1
RX packets:1085 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns...
john (g-john-p) wrote : | #27 |
Ryan, is it possible to do a webex/zoom into my environment. I know you are giving your thoughts on what might be wrong. What I can tell you is this works for curtin505 and not for 532, so there is something fundatmentally wrong with the config of these machines. I don't know enough about what you changed to debug it. maybe if you can log onto our system you can see. I'm very concerned that you didn't test with OVS or event your openstack environment because it should behave the same way. OVS will enslave a real interface and that it needs to be the same mac address. the fact that the problem is with the OVS interface mean it might be some incompatibilty with 538 and OVS.
Can we schedule a call?
john (g-john-p) wrote : | #28 |
more info:
please see the message:
RTNETLINK answers: Invalid argument
RTNETLINK answers: Numerical result out of range
Failed to bring up eth1.10.
root@MACH4:~# ifup -v br-ext
Configuring interface br-ext=br-ext (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/
run-parts: executing /etc/network/
run-parts: executing /etc/network/
run-parts: executing /etc/network/
+ [ inet = meta ]
+ IF_BOND_SLAVES=
+ [ ]
+ [ ]
+ [ -z ]
+ exit
run-parts: executing /etc/network/
run-parts: executing /etc/network/
SIOCSIFFLAGS: Network is down
Set name-type for VLAN subsystem. Should be visible in /proc/net/
RTNETLINK answers: Invalid argument
RTNETLINK answers: Numerical result out of range
Failed to bring up eth1.10.
run-parts: executing /etc/network/
/bin/ip addr add 192.168.
/bin/ip link set dev br-ext up
/bin/run-parts --exit-on-error --verbose /etc/network/
run-parts: executing /etc/network/
run-parts: executing /etc/network/
run-parts: executing /etc/network/
+ [ inet = meta ]
+ [ ]
run-parts: executing /etc/network/
run-parts: executing /etc/network/
run-parts: executing /etc/network/
run-parts: executing /etc/network/
john (g-john-p) wrote : | #29 |
Ryan - I think somehow curtin532 has exposed this bug https:/
Changed in curtin: | |
status: | New → Incomplete |
David Britton (dpb) wrote : | #30 |
Marked Incomplete. We suspect this is a problem in that charm that needs to be fixed, but to be sure, please attach:
/etc/network/
/etc/network/
*before* the charm in question is executed. Usually, it would be enough to deploy to the same node, but use the 'ubuntu' charm to be able to capture these things.
Thanks!
john (g-john-p) wrote : | #31 |
please close. We suspect that there was an old version of the xenial image or corrupted apt-update. We rebuilt our environment and it now works.
Changed in curtin: | |
status: | Incomplete → Invalid |
juju deploy log file: http:// paste.ubuntu. com/25961066/
our charm code https:/ /github. com/cplane- networks/ dvnd-juju/ tree/master/ neutron- openvswitch- cplane