users module does not allow ssh_import_id and ssh_authorized_keys at the same time

Bug #1997588 reported by Niels Robin-Aubertin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
Unassigned

Bug Description

I'm on ubuntu 22.04, using multipass 1.10.1 with a cloud-init file to instanciate a simple server:

```yaml
users:
  - name: ubuntu
    ssh_authorized_keys:
      - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOkF+W1ETkZQr5PWhcugCVh3aSyNDFTYQRRblh7prGXN
    ssh_import_id:
      - lp:nrobinaubertin
```

I launch the instance with:
```shell
multipass launch -n simple_instance -d 10G -m 1G -c 1 --cloud-init cloud-init.yaml 22.04
```

And I check the authkeys file with:
```shell
multipass exec simple_instance -- cat /home/ubuntu/.ssh/authorized_keys
```

The key from `ssh_authorized_keys` is there but not the one from `ssh_import_id`.
From the documentation website and the examples given [here](https://cloudinit.readthedocs.io/en/latest/topics/examples.html) I would expect both keys to be present.

Revision history for this message
Alberto Contreras (aciba) wrote :

Thanks, nrobinaubertin, for reporting this.

Could you please attach the instance logs[1]?

[1] https://cloudinit.readthedocs.io/en/latest/topics/bugs.html#collect-logs

Changed in cloud-init:
status: New → Incomplete
Revision history for this message
Niels Robin-Aubertin (nrobinaubertin) wrote :

Here is the log of an instance (created as written in the first message)

Revision history for this message
Alberto Contreras (aciba) wrote :

Thanks, nrobinaubertin. I have reproduced this behavior on multipass and lxd.

Changed in cloud-init:
status: Incomplete → Triaged
importance: Undecided → Medium
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.