canonical / canonical/cloud-init

ds-identify needs to support check_instance_id like function

Open
#2,853 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: #1680116](https://bugs.launchpad.net/cloud-init/+bug/1680116)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2017-04-05T14:39:41.828421+00:00
date_fix_committed = None
date_fix_released = None
id = 1680116
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1680116
milestone = None
owner = smoser
owner_name = Scott Moser
private = False
status = triaged
submitter = smoser
submitter_name = Scott Moser
tags = ['dsid']
duplicates = [1838026]

_Launchpad user **Scott Moser(smoser)** wrote on 2017-04-05T14:39:41.828421+00:00_

When ds-identify runs, it identifies the cloud platform based on available information.
For some datasources provided as an attached disk, the cloud provider may remove that disk at some time (or potentially, the user might destroy it). In such cases (Azure and ConfigDrive) the system id read from smbios is the same as the instance-id, so we can locally quickly check.

cloud-init's datasource search code supports this via the 'check_instance_id' method in a datasource.
Basically, that function is called from the old datasource. If it retunrs true, then cloud-init would not go looking for an attached disk that it would not find.

The ds-identify code does not support this at the moment. The result is if you did:
* boot system with configdrive
* dd if=/dev/zero of=/dev/disk/by-name/config-2
* reboot

ds-identify would then not recognize this system as config drive even though the datasource would recognize it was.

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.