[Pkg-sysvinit-devel] /run transition

Roger Leigh rleigh at codelibre.net
Sat Apr 23 08:53:51 UTC 2011


On Sat, Apr 23, 2011 at 10:07:28AM +1000, Kel Modderman wrote:
> On Sat, 23 Apr 2011 04:27:00 AM Roger Leigh wrote:
> > Hi Kel and other sysvinit developers,
> > 
> > I've attached a further update for your consideration, which fixes a
> > few issues.  If it's OK with you, this could be uploaded to
> > experimental (with your changes folded into the same version in the
> > changelog) as 2.88dsf-13.5.  Unless you'd prefer to do a maintainer
> > upload.

> In my opnion: do not hesitate to upload this to experimental and continue the
> improvement of the transition to /run.

Thanks.

Following discussion with the systemd folks, they would prefer it if we
could deprecate /etc/default/tmpfs and migrate to using /etc/fstab
directly.  This is because systemd can't make use of /etc/default/fstab
directly, and if we both use fstab it's both more obvious for the user
since it's in an expected place, and it can be shared with systemd.

I've attached a proposed patch for this.  Note that this is tested, but
not yet final.  I also attached a patch to tighten up mount options
where possible.

Currently we have hardcoded defaults in /lib/init/tmpfs.sh, user
overrides of those defaults in /etc/default/tmpfs, and the additional
possibility of overriding those in /etc/fstab.  This patch converts any
customised /etc/default/tmpfs settings into fstab entries, which would
allow the /etc/default/tmpfs conffile to be dropped for wheezy.

> Have you any comment about #623174

This is already the case.  With the patched initramfs-tools (branch
maks/run) the initramfs mounts /run and subsequently uses
"mount --move" to move it only the root filesystem's /run.  initscripts
won't mount a second filesystem on /run if one is already mounted (the
above changes simply cause a remount with the correct mount options).

In consequence, I think all we need to do is have a dependency (possibly
linux-specific?) on the version of initramfs-tools introducing /run
support, which will ensure that if we support /run, it will have been
mounted in the early initramfs.

> and #623076 ?

This is an odd one.  We don't touch anything under /etc/network, and the
/run changes don't alter anything except mounting /run and creating the
compatibility symlinks/bind mounts.

What I /think/ might be going on here is that ifupdown interacts badly
with /dev/shm being a symlink, but I need to do more testing to confirm
this.  What I see is that "auto eth0" works, but "allow-hotplug eth0"
does not; this is because the interfaces are "up" but unconfigured, so
the hotplug event never occurs, and hence no DHCP discovery is done.
Taking the interface down and up again results in it working correctly.

I've checked several times that /dev/shm is always valid; I even moved
the symlink creation to immediately after /run/shm being mounted.  Even
when /etc/network/run is just a directory (as opposed to being a symlink
to /dev/shm/network or /run/network), networking fails to initialise.
This is despite /etc/network/run/ifstate being created in every case, so
it's not an issue with creating/updating the state file.

I did see a request for sponsorship of an ifupdown update which made it
use /run rather than all this messing around with /dev/shm and symlinks.
I suspect the breakage is in the ifupdown init script, which looks like
it makes use of /dev/shm, and may not like /dev/shm being a symlink.  I
don't think this is a bug in initscripts, but I will continue to
investigate the cause.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: initscripts-default-fstab-migrate.patch
Type: text/x-diff
Size: 2974 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20110423/1eb49f86/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: initscripts-stricter-mount.patch
Type: text/x-diff
Size: 907 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20110423/1eb49f86/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20110423/1eb49f86/attachment.pgp>


More information about the Pkg-sysvinit-devel mailing list