Networker shouldn't touch /etc/network/interfaces in a local environment

Bug #1349635 reported by Jesse Meek
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Michael Foord

Bug Description

Steps to reproduce on trusty 13.04:

# create and start container
1. sudo lxc-create --name c1
2. sudo lxc-start --name c1

# get container ip
3. sudo lxc-ls --fancy

# bootstrap local env and manually provision container
4. juju bootstrap
5. juju addmachine ssh:ubuntu@[container.ip]

# destroy lxc
6. sudo lxc-stop --name c1
7. sudo lxc-destroy --name c1

You now have a broken network configuration. Restart your computer and you should be greeted by a message about the missing network configuration. You should now be unable to connect to the internet. To recover the network:

sudo restart network-manager

# or
sudo start network-manager

# or
sudo /etc/init.d/networking force-reload

# get indicator running in unity panel
/usr/bin/nm-applet

# fix boot time network config issue by adding the following to /etc/network/interfaces
auto lo
iface loinet loopback

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

The problem stems from the recent changes in the networker worker. It's too eager to reconfigure /etc/network/interfaces file to include existing NICs config from /etc/network/interfaces.d/*.cfg. This is OK for MAAS and possibly other providers, but not for the local provider, as we shouldn't touch the users' network config like that.

tags: added: local-provider networker regression
summary: - Destroying a manually provisioned lxc container breaks network
- configuration on host computer.
+ Networker shouldn't touch /etc/network/interfaces in a local environment
Changed in juju-core:
importance: Undecided → Critical
Changed in juju-core:
assignee: nobody → Michael Foord (mfoord)
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Easier steps to reproduce this, without breaking your networking setup (hopefully):
1. $ sudo cp /etc/network/interfaces /etc/network/interfaces~
2. Bootstrap a local environment with default config
3. After machine-0 is running in $ juju status, ensure the /etc/network/interfaces and /etc/network/interfaces~ differ
4. Destroy the environment and replace your interfaces file with the backup (no need to start or stop anything I think), possibly also removing /etc/network/interfaces.d/*.cfg the networker created.

Changed in juju-core:
status: Triaged → Won't Fix
status: Won't Fix → In Progress
milestone: none → next-stable
Revision history for this message
Michael Foord (mfoord) wrote :
Michael Foord (mfoord)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: network
removed: networker
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: next-stable → 1.21-alpha1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.