canonical / canonical/pycloudlib

[enhancement]: lxd config user.meta-data may disappear, investigate alternatives using cloud-init.vendor-data

Open
#434 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
22
Forks
42
PR merge metrics
No merged PRs in 30d

Description

pycloudlib currently leverages a now undocumented [lxd config feature user.meta-data](https://github.com/canonical/lxd/issues/13853#issuecomment-2374472140) to inject public-ssh-keys into every launched lxd instance to allow for SSH into the VM during boot in the absence of cloud-init.user-data.

Look to leverage cloud-init.vendor-data if possible, the caveat being that instance launches will have to take into account:
- LXD kvm-based launches setup a [common profile which uses cloud-init.vendor-data to setup the lxd agent in Bionic](https://github.com/canonical/pycloudlib/blob/main/pycloudlib/lxd/defaults.py#L10-L26), so instance launch would need to merge with existing cloud-init.vendor-data in profile configs if defined
- instance launches which provide user-data with ssh_authorized_keys: values in config would need to append to any cloud-specific authorized keys defined.

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.