canonical / canonical/cloud-init
util.mount_cb will create an unused temporary directory if the passed `device` is already mounted
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 22
Description
This bug was originally filed in Launchpad as [LP: #1885327](https://bugs.launchpad.net/cloud-init/+bug/1885327)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2020-06-26T19:41:56.797827+00:00
date_fix_committed = None
date_fix_released = None
id = 1885327
importance = wishlist
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1885327
milestone = None
owner = oddbloke
owner_name = Dan Watkins
private = False
status = triaged
submitter = oddbloke
submitter_name = Dan Watkins
tags = []
duplicates = []
_Launchpad user **Dan Watkins(oddbloke)** wrote on 2020-06-26T19:41:56.797827+00:00_
The tmpdir creation happens before (and around, as a contextmanager) the determination of whether or not a mount will be needed. This could be improved.
Contributor guide
Research direction
Start by locating util.mount_cb and inspect how it creates the temporary directory relative to checking whether the device is already mounted. The fix is done when an already-mounted device does not cause an unused temporary directory to be created, while normal mounting behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100