cc_mounts should ensure_dir on lower, upper and workdir params

Bug #1695277 reported by Ryan Harper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Low
Unassigned

Bug Description

Ubuntu Trusty 14.04 machine that mounts an overlayfs at /var/spool/postfix, and this works great:

fs_setup:
  - label: postfix
    device: /dev/xvde
    filesystem: ext4
mounts:
- [ /dev/xvde, /mnt/postfix-overlay ]
- [ overlayfs, /var/spool/postfix, "overlayfs", "defaults,lowerdir=/var/spool/postfix,upperdir=/mnt/postfix-overlay", "0", "2" ]
mount_default_fields: [ None, None, "auto", "defaults,nobootwait", "0", "2” ]

Upgrading the system image to Xenial 16.04 causes the overlayfs to fail to mount with the error “missing ‘workdir’”.

Turns out, between Trusty and Xenial, the “workdir” directory in overlayfs went from optional to mandatory, and now the system no longer deploys.

What needs to happen is that after the fs_setup step that creates /mnt/postfix-overlay, but before the mounts section where the overlayfs is created, the workdir and upperdir directories need to be created on the /mnt/postfix-overlay disk as /mnt/postfix-overlay/upperdir and /mnt/postfix-overlay/workdir (or something) respectively.

Scott Moser (smoser)
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Confirmed → Expired
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.