canonical / canonical/cloud-init
cloud-init cannot create swap files on paths that it mounts
- 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: #1869114](https://bugs.launchpad.net/cloud-init/+bug/1869114)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2020-03-26T01:03:00.287171+00:00
date_fix_committed = None
date_fix_released = None
id = 1869114
importance = wishlist
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1869114
milestone = None
owner = johnsonshi
owner_name = Johnson Shi
private = False
status = triaged
submitter = johnsonshi
submitter_name = Johnson Shi
tags = []
duplicates = []
_Launchpad user **Johnson Shi(johnsonshi)** wrote on 2020-03-26T01:03:00.287171+00:00_
1. cloud-init's swap module runs before the mount module, which causes swapfile creation on runtime mounted disks to fail.
2. cloud-init's swap create does not ensure it has a path to the file (if specified with a directory that does not exist yet).
Bug exists in all clouds, but the bug was discovered through deploying an Azure VM, mounting the Azure resource disk, and then creating a swapfile within the mounted resource disk.
Relevant logs: https://paste.ubuntu.com/p/QdGybC2wyc/
Contributor guide
Assessment
This issue has not been assessed yet.