something deleting /run/network after initramfs

Bug #1432821 reported by Scott Moser on 2015-03-16
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
High
Martin Pitt

Bug Description

maas images utilize cloud-initramfs-dyn-netconf . The way this works is basically:
 * /etc/network/interfaces in image is a link to ../../run/network/dynamic-interfaces
 * kernel command line 'ip=' convince the initramfs to bring up networking using 'ipconfig'
   example: ip=::::maas-enlist:BOOTIF
 * ipconfig writes files in /run/net-*.conf for each interface it configures.
 * cloud-initramfs-dyn-netconf module writes /run/network/dyanmic-interfaces based on /run/net-*.conf files that 'ipconfig' creates.

end result is that after the move to real root, /etc/network/interfaces should be a symlink to /run/ that ends up having something like this:

 | ## This file is generated by cloud-initramfs-dyn-netconf
 | auto lo
 | iface lo inet loopback
 | manual eth0
 | iface eth0 inet dhcp
 | dns-nameservers 192.168.64.3
 | dns-search maas

I'm seeing 2 different issues here.
a.) something is specifcally deleting /run/network/
   I say specifically, because if I change '/run/network' above to '/run/xnetwork', including the symlink, then it works as designed.

b.) resolvconf seems not to be working as well as it should be. (filed as bug 1432829)
   in all other supported ubuntu releases, doing the abovel results in functional resolv.conf via resolv.conf.

I'm not sure what is doing the cleaning, but it is after the pivot root, and before I log in to look.

Related Bugs:
 * bug 1432829: resolvconf not updated correctly for interfaces configured in initramfs

Scott Moser (smoser) on 2015-03-16
description: updated

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1432821/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Scott Moser (smoser) on 2015-03-17
Changed in ubuntu:
status: New → Confirmed
importance: Undecided → High
affects: ubuntu → systemd (Ubuntu)
Scott Moser (smoser) on 2015-03-17
summary: - something deleting /run/network after during boot
+ something deleting /run/network after initramfs
Scott Moser (smoser) wrote :

So, thanks to xnox.
 /lib/systemd/system/ifup@.service
has 'RuntimeDirectory=network'

So that is what is killing /run/network .
He suggested we should remove this from ifup@.service and ship a file in /usr/lib/tmpfiles.d that does:
 d /run/network 0755 root root -

Scott Moser (smoser) wrote :
tags: added: patch
Didier Roche (didrocks) wrote :

@Scott: I'm assigning to Martin so that he can see it once he's back from holidays.

I don't feel myself confident enough in the network interactions of systemd to ensure this is the right way to get it fixed.

Changed in systemd (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Dimitri John Ledkov (xnox) wrote :

@smoser looks good to me, imho this is critical thus please go ahead with the upload. If this is not suitable for debian, or alternative implementation is used to resolve this issue in the future we can always back out this change.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 219-4ubuntu6

---------------
systemd (219-4ubuntu6) vivid; urgency=medium

  * d/extra/units/ifup@.service, d/extra/tmpfiles.d/debian.conf:
    use tmpfiles.d population of /run/network rather than
    'RuntimeDirectory' in the ifup service. This way files created
    in initramfs are not deleted. (LP: #1432821)
 -- Scott Moser <email address hidden> Tue, 17 Mar 2015 19:40:45 -0400

Changed in systemd (Ubuntu):
status: Confirmed → Fix Released
Martin Pitt (pitti) wrote :

This is the right fix (together with https://launchpad.net/ubuntu/+source/systemd/219-4ubuntu8), thanks Scott!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers