canonical / canonical/cloud-init
cloud-init doesn't cache network_config property in cache
- 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: #1716773](https://bugs.launchpad.net/cloud-init/+bug/1716773)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2017-09-12T21:08:38.045018+00:00
date_fix_committed = None
date_fix_released = None
id = 1716773
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1716773
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-09-12T21:08:38.045018+00:00_
When init net stage runs, it will restore the cloud object cache in /var/lib/cloud/instance/obj.pkl
This cache dump is created before cloud-init processes the datasource, which means some of the data cloud-init has fetched is not cached.
In particular, we've observed that the 'network_config' attribute is populated and set in init-local mode, but when we run init-net; it will re-run due to the underlying object value still be set to None (the default) as we failed to cache the object after modifying it.
Contributor guide
Research direction
Start by tracing the init-local and init-net stages around the cloud object cache at /var/lib/cloud/instance/obj.pkl, focusing on when network_config is populated and restored. Done means the value set during init-local is persisted and available in init-net without being re-fetched unnecessarily; add or update tests covering that cache flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100