canonical / canonical/cloud-init

cc_mounts should ensure_dir on lower, upper and workdir params

Open
#2,916 0 comments 0 reactions 0 assignees View on GitHub
bug launchpad
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

This bug was originally filed in Launchpad as [LP: #1695277](https://bugs.launchpad.net/cloud-init/+bug/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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.