canonical / canonical/cloud-init
cc_mounts.py fails to remove ephemeral entry from fstab
- 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: #1291820](https://bugs.launchpad.net/cloud-init/+bug/1291820)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2014-03-13T07:07:33.720384+00:00
date_fix_committed = None
date_fix_released = None
id = 1291820
importance = low
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1291820
milestone = None
owner = hannes-p
owner_name = Hannes Schmidt
private = False
status = triaged
submitter = hannes-p
submitter_name = Hannes Schmidt
tags = []
duplicates = []
_Launchpad user **Hannes Schmidt(hannes-p)** wrote on 2014-03-13T07:07:33.720384+00:00_
1) Create an m1.small instance starting with a stock Raring AMI.
2) Create a new EBS-backed AMI from that instance
3) Create a t1.micro instance with user-data
mounts:
- [ephemeral0, null]
4) look at /etc/fstab
Expected: There should be no entry for the ephemeral device.
Actual: There is
/dev/xvdb /mnt/ephemeral auto defaults,nobootwait,comment=cloudconfig 0 2
cc_mounts.py adds the entry to fstab in step 1) but then fails to remove the entry in step 3) because it bails out prematurely in line
https://github.com/number5/cloud-init/blob/0.7.2/cloudinit/config/cc_mounts.py#L155
before it has a chance to filter the line in
https://github.com/number5/cloud-init/blob/0.7.2/cloudinit/config/cc_mounts.py#L175
The relevant (I hope) log lines are
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] helpers.py[DEBUG]: Running config-disk-setup using lock ()
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-77144128/sem/config_mounts - wb: [420] 19 bytes
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] helpers.py[DEBUG]: Running config-mounts using lock ()
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] cc_mounts.py[DEBUG]: Attempting to determine the real name of ephemeral0
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] cc_mounts.py[DEBUG]: Ignorming nonexistant named mount ephemeral0
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] cc_mounts.py[DEBUG]: Attempting to determine the real name of ephemeral0
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] cc_mounts.py[DEBUG]: Ignoring nonexistant default named mount ephemeral0
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] cc_mounts.py[DEBUG]: Attempting to determine the real name of swap
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] DataSourceEc2.py[DEBUG]: Unable to convert swap to a device
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] cc_mounts.py[DEBUG]: Ignoring nonexistant default named mount swap
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] cc_mounts.py[DEBUG]: Skipping non-existent device named ephemeral0
Mar 13 06:28:08 ip-10-222-249-176 [CLOUDINIT] cc_mounts.py[DEBUG]: No modifications to fstab needed.
Contributor guide
Assessment
This issue has not been assessed yet.