Skip to content

cc_mounts should ensure_dir on lower, upper and workdir params #2916

@ubuntu-server-builder

Description

@ubuntu-server-builder

This bug was originally filed in Launchpad as LP: #1695277

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2017-06-02T14:03:10.564908+00:00
date_fix_committed = None
date_fix_released = None
id = 1695277
importance = low
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1695277
milestone = None
owner = raharper
owner_name = Ryan Harper
private = False
status = confirmed
submitter = raharper
submitter_name = Ryan Harper
tags = []
duplicates = []

Launchpad user Ryan Harper(raharper) wrote on 2017-06-02T14:03:10.564908+00:00

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlylaunchpadMigrated from Launchpad

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions