[2.0RC2] Unable to add a public SSH Key due to lp1604147
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Gavin Panella | ||
2.0 |
Fix Released
|
Critical
|
Unassigned | ||
maas (Ubuntu) |
Fix Released
|
Critical
|
Unassigned | ||
Xenial |
Confirmed
|
Critical
|
Unassigned | ||
Yakkety |
Fix Released
|
Critical
|
Unassigned |
Bug Description
[Impact]
With a recent update of python from 3.5.1 to 3.5.2, the pathlib.Path.path property is gone. This impacts MAAS as it will cause it to fail importing SSH keys, which prevents users from deploying.
[Test Case]
1. Install MAAS
2. Import SSH Key (example, maas maas sshkeys create key="$(ssh-add -L | grep <email address hidden>)")
With fix - The key will be imported correctly.
Without fix - The key will fail to import.
Work around sudden loss of pathlib.Path.path property in Python 3.5.2 release.
[Regression Potential]
None. Tested and proved that using the different path fixes the issue.
== Original bug report ==
When I add a public SSH key over the API or in the UI I get the following error
$ maas maas sshkeys create key="$(ssh-add -L | grep <email address hidden>)"
{"key": ["Invalid SSH public key: 'PosixPath' object has no attribute 'path'"]}
This was introduced in 5118 in the validation code of SSH keys but appears to be exposing a bigger bug. If you run ./bin/test.rack src/provisionin
Related branches
- Andres Rodriguez (community): Approve
- Lee Trager (community): Approve
-
Diff: 50 lines (+5/-5)3 files modifiedsrc/provisioningserver/refresh/tests/test_node_info_scripts.py (+2/-2)
src/provisioningserver/refresh/tests/test_refresh.py (+1/-1)
src/provisioningserver/utils/sshkey.py (+2/-2)
- Lee Trager (community): Approve
-
Diff: 63 lines (+7/-5)4 files modifieddocs/changelog.rst (+2/-0)
src/provisioningserver/refresh/tests/test_node_info_scripts.py (+2/-2)
src/provisioningserver/refresh/tests/test_refresh.py (+1/-1)
src/provisioningserver/utils/sshkey.py (+2/-2)
summary: |
- [2.0RC3] Unable to add a public SSH Key + [2.0RC2] Unable to add a public SSH Key |
description: | updated |
tags: | added: cdo-qa-blocker |
no longer affects: | python3.5 (Ubuntu) |
Changed in maas: | |
assignee: | nobody → Gavin Panella (allenap) |
status: | Triaged → In Progress |
tags: |
added: cdoqa-blocker removed: cdo-qa-blocker |
summary: |
- [2.0RC2] Unable to add a public SSH Key + [2.0RC2] Unable to add a public SSH Key due to lp1604147 |
Changed in maas (Ubuntu Xenial): | |
importance: | Undecided → Critical |
description: | updated |
Changed in maas (Ubuntu Yakkety): | |
importance: | Undecided → Critical |
tags: |
added: verification-done removed: verification-needed |
Changed in maas (Ubuntu Xenial): | |
status: | Confirmed → Fix Committed |
status: | Fix Committed → Confirmed |
Changed in maas (Ubuntu Xenial): | |
milestone: | none → xenial-updates |
tags: | added: sts |
Changed in maas: | |
status: | Fix Committed → Fix Released |
This appears to be a result of a Python 3.5.1 -> 3.5.2 update in Xenial. Filed as bug 1604147.