** Description changed:

+ ==== Begin SRU Template ====
+ [Impact]
+ Overlayfs allows a user to mount the root filesystem read-only
+ and put an overlay over it.
+ It handles mounting of the root filesystem in the initramfs, and updates
+ /etc/fstab to account for non-root filesystems and generally make
+ /etc/fstab "correct".
+ 
+ systemd can get confused by a /etc/fstab that looks like this:
+ 
+    LABEL=cloudimg-rootfs /media/root-ro/ ext4 ro,defaults,noauto 0 0
+    /media/root-ro/ / overlay lowerdir=...
+ 
+ It would not recognize that the LABEL=cloudimg-rootfs image *was* mounted.
+ This would lead to boot ordering cycles.  The fix that was ultimately
+ applied was just to comment out the line for /media/root-ro.
+ 
+ That way systemd wouldnt try to ensure that /media/root-ro got mounted.
+ 
+ [Test Case]
+ TBD
+ 
+ [Regression Potential]
+ Not to omany things would depend on the /etc/fstab that exists in
+ an system booted with overlayroot.  Something that was reading /etc/fstab
+ could be confused by this change.
+ 
+ [Other Info]
+ This change is believed to fix bug 1680197 as well, but due to the
+ sporadic nature, we are not certain.
+ 
+ ==== End SRU Template ====
+ 
+ 
  I had reported this once before in bug 1666573.
  I thought it was fixed there, but apparently not.
  
  The failure shows itself as (controls removed):
    [   80.089654] systemd[1]: media-root\x2dro.mount: Found ordering cycle on 
media-root\x2dro.mount/start
    [   80.099474] systemd[1]: media-root\x2dro.mount: Found dependency on 
-.mount/start
    [   80.108348] systemd[1]: media-root\x2dro.mount: Found dependency on 
media-root\x2dro.mount/start
    [   80.117231] systemd[1]: Unable to break cycle
    [   80.132286] systemd[1]: Requested transaction contains an unfixable 
cyclic ordering dependency: Resource deadlock avoided
    [   80.180707] systemd[1]: Unnecessary job for VIRTUAL-DISK cloudimg-rootfs 
was removed.
  ...
   [ TIME ] Timed out waiting for device dev-disk-by\x2dlabel-UEFI.device.
   [DEPEND] Dependency failed for /boot/efi.
   [DEPEND] Dependency failed for Local File Systems.
  
  The /etc/fstab as read from / once we've left the initramfs
  looks like:
    #
    #  This fstab is in an overlay. The real one can be found at
    #  /media/root-ro/etc/fstab
    #  The original entry for '/' and other mounts have been updated to be 
placed
    #  under /media/root-ro.
    #  To permanently modify this (or any other file), you should change-root 
into
    #  a writable view of the underlying filesystem using:
    #      sudo overlayroot-chroot
    #
    LABEL=cloudimg-rootfs /media/root-ro/ ext4 ro,defaults,noauto 0 0
    /media/root-ro/ / overlay 
lowerdir=/media/root-ro/,upperdir=/media/root-rw/overlay/,workdir=/media/root-rw/overlay-workdir/_
 0 0
    LABEL=UEFI /boot/efi vfat defaults 0 0 # overlayroot:fs-unsupported
  
  Notes:
   * I do not believe this is strictly tied to open-iscsi, but the
     test that we see it failing in is the open-iscsi test.
  
  Related bugs:
   * bug 1666573: transient systemd ordering cycle in boot with overlayroot ver 
read-only open-iscsi root
-  * bug 1680197:  Zesty deployments failing sporadically
+  * bug 1680197:  Zesty deployments failing sporadically

** Description changed:

  ==== Begin SRU Template ====
  [Impact]
  Overlayfs allows a user to mount the root filesystem read-only
  and put an overlay over it.
  It handles mounting of the root filesystem in the initramfs, and updates
  /etc/fstab to account for non-root filesystems and generally make
  /etc/fstab "correct".
  
  systemd can get confused by a /etc/fstab that looks like this:
  
     LABEL=cloudimg-rootfs /media/root-ro/ ext4 ro,defaults,noauto 0 0
     /media/root-ro/ / overlay lowerdir=...
  
  It would not recognize that the LABEL=cloudimg-rootfs image *was* mounted.
  This would lead to boot ordering cycles.  The fix that was ultimately
  applied was just to comment out the line for /media/root-ro.
  
  That way systemd wouldnt try to ensure that /media/root-ro got mounted.
  
+ The fix that was put in place was just to comment out the '/' (/media/root-ro)
+ line in /etc/fstab.  So essentially:
+  - LABEL=cloudimg-rootfs /media/root-ro/ ext4 ro,defaults,noauto 0 0
+  + #LABEL=cloudimg-rootfs /media/root-ro/ ext4 ro,defaults,noauto 0 0
+ 
+ Since that happens in the initramfs before systemd ever generates mount
+ options, it has the desired affect.  And /media/root-ro is already mounted
+ before systemd starts.
+ 
  [Test Case]
  TBD
  
  [Regression Potential]
  Not to omany things would depend on the /etc/fstab that exists in
  an system booted with overlayroot.  Something that was reading /etc/fstab
  could be confused by this change.
  
  [Other Info]
  This change is believed to fix bug 1680197 as well, but due to the
  sporadic nature, we are not certain.
  
  ==== End SRU Template ====
- 
  
  I had reported this once before in bug 1666573.
  I thought it was fixed there, but apparently not.
  
  The failure shows itself as (controls removed):
    [   80.089654] systemd[1]: media-root\x2dro.mount: Found ordering cycle on 
media-root\x2dro.mount/start
    [   80.099474] systemd[1]: media-root\x2dro.mount: Found dependency on 
-.mount/start
    [   80.108348] systemd[1]: media-root\x2dro.mount: Found dependency on 
media-root\x2dro.mount/start
    [   80.117231] systemd[1]: Unable to break cycle
    [   80.132286] systemd[1]: Requested transaction contains an unfixable 
cyclic ordering dependency: Resource deadlock avoided
    [   80.180707] systemd[1]: Unnecessary job for VIRTUAL-DISK cloudimg-rootfs 
was removed.
  ...
   [ TIME ] Timed out waiting for device dev-disk-by\x2dlabel-UEFI.device.
   [DEPEND] Dependency failed for /boot/efi.
   [DEPEND] Dependency failed for Local File Systems.
  
  The /etc/fstab as read from / once we've left the initramfs
  looks like:
    #
    #  This fstab is in an overlay. The real one can be found at
    #  /media/root-ro/etc/fstab
    #  The original entry for '/' and other mounts have been updated to be 
placed
    #  under /media/root-ro.
    #  To permanently modify this (or any other file), you should change-root 
into
    #  a writable view of the underlying filesystem using:
    #      sudo overlayroot-chroot
    #
    LABEL=cloudimg-rootfs /media/root-ro/ ext4 ro,defaults,noauto 0 0
    /media/root-ro/ / overlay 
lowerdir=/media/root-ro/,upperdir=/media/root-rw/overlay/,workdir=/media/root-rw/overlay-workdir/_
 0 0
    LABEL=UEFI /boot/efi vfat defaults 0 0 # overlayroot:fs-unsupported
  
  Notes:
   * I do not believe this is strictly tied to open-iscsi, but the
     test that we see it failing in is the open-iscsi test.
  
  Related bugs:
   * bug 1666573: transient systemd ordering cycle in boot with overlayroot ver 
read-only open-iscsi root
   * bug 1680197:  Zesty deployments failing sporadically

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1723183

Title:
  transient systemd ordering issue when using overlayroot

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-initramfs-tools/+bug/1723183/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to