Add support for multiple trigger keys

Bug #1972916 reported by Haw Loeung
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Mirror Charm
New
Undecided
Unassigned

Bug Description

Hi,

For triggers, such as mirror_ubuntu_trigger, when there are multiple keys provided the trigger template is only applied to the first rendering the second key useless. e.g.

| from="10.1.2.3" ssh-rsa ...
| from="192.168.1.1" ssh-ed25519 ...

The generated SSH authorized_key becomes:

| no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command="/srv/ubuntu-mirror/bin/mirror-2stage.sh ubuntu &",from="10.1.2.3" ssh-rsa ...
| from="192.168.1.1" ssh-ed25519 ...

With the second line, it should contain the no-* configs as well as the SSH command.

Revision history for this message
Haw Loeung (hloeung) wrote :

This is likely https://git.launchpad.net/ubuntu-mirror-charm/tree/hooks/hooks.py#n816

Ideally, we want to split on line break and prefix the SSH_TRIGGER_TEMPLATE to each.

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.