[2.1] MAAS fails to add SSH keys if server has duplicate keys

Bug #1651280 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato
2.3
Fix Released
High
Alberto Donato

Bug Description

MAAS fails to add SSH keys (from a launchpad source, although we can safely assume it is wide spread), if the server contains duplicate keys.

For example:

ubuntu@xenial-maas20:~$ ssh-import-id andreserl
2016-12-19 23:40:09,420 INFO Starting new HTTPS connection (1): launchpad.net
[...]
2016-12-19 23:40:10,718 INFO Already authorized ['4096', 'SHA256:lSNlRpVuNBYIBl5gY2B8sezGaVGVYzs7N1LV3sxX3BM', 'roaksoax@rivals', '(RSA)']
2016-12-19 23:40:10,721 INFO Already authorized ['4096', 'SHA256:lSNlRpVuNBYIBl5gY2B8sezGaVGVYzs7N1LV3sxX3BM', 'roaksoax@rivals', '(RSA)']
[...]

But in MAAS it shows an error message:

"This key has already been added for this user."

Related branches

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Yes, I think this should silently succeed. No need to warn the user about duplicate keys, whether they are added manually or automatically.

summary: - [2.1] MAAS fails to add SSH keys is server has duplicate keys
+ [2.1] MAAS fails to add SSH keys if server has duplicate keys
Changed in maas:
milestone: 2.2.0 → 2.2.x
no longer affects: maas/trunk
Changed in maas:
milestone: 2.2.x → 2.3.0
no longer affects: maas/2.1
Changed in maas:
milestone: 2.3.0 → 2.3.x
Revision history for this message
Alberto Donato (ack) wrote :

How can I reproduce the issue? I tried adding the same keys I have on LP with the "upload" type, then added them again via the LP user. I didn't get any error.

Changed in maas:
status: Triaged → Incomplete
Revision history for this message
Alberto Donato (ack) wrote :

To confirm, we want to silently succeed and update ssh keys if they're already present

Changed in maas:
status: Incomplete → Triaged
Alberto Donato (ack)
Changed in maas:
status: Triaged → In Progress
assignee: nobody → Alberto Donato (ack)
Alberto Donato (ack)
Changed in maas:
milestone: 2.3.x → 2.3.0
Changed in maas:
milestone: 2.3.0 → 2.4.x
no longer affects: maas/trunk
Changed in maas:
milestone: 2.3.1 → 2.4.0alpha1
Alberto Donato (ack)
Changed in maas:
milestone: 2.4.0alpha1 → 2.4.x
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
milestone: 2.4.x → 2.4.0alpha1
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.