[2.0RC2] Unable to add a public SSH Key due to lp1604147
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| MAAS |
Critical
|
Gavin Panella | ||
| 2.0 |
Critical
|
Unassigned | ||
| Trunk |
Critical
|
Gavin Panella | ||
| maas (Ubuntu) |
Critical
|
Unassigned | ||
| Xenial |
Critical
|
Unassigned | ||
| Yakkety |
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: Approve on 2016-07-18
- Lee Trager: Approve on 2016-07-18
-
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: Approve on 2016-07-18
-
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 |
Hello Lee, or anyone else affected,
Accepted maas into xenial-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
description: | updated |
Changed in maas (Ubuntu Xenial): | |
status: | New → Fix Committed |
tags: | added: verification-needed |
Launchpad Janitor (janitor) wrote : | #3 |
This bug was fixed in the package maas - 2.0.0~rc2+
---------------
maas (2.0.0~
* debian/
regression in the recent update to Python 3.5.2 that lost the
pathlib.
-- Andres Rodriguez <email address hidden> Mon, 18 Jul 2016 17:10:55 -0400
Changed in maas (Ubuntu Yakkety): | |
status: | New → Fix Released |
tags: |
added: verification-done removed: verification-needed |
Launchpad Janitor (janitor) wrote : | #4 |
This bug was fixed in the package maas - 2.0.0~rc2+
---------------
maas (2.0.0~
* debian/
regression in the recent update to Python 3.5.2 that lost the
pathlib.
-- Andres Rodriguez <email address hidden> Mon, 18 Jul 2016 16:56:26 -0400
Changed in maas (Ubuntu Xenial): | |
status: | Fix Committed → Fix Released |
Steve Langasek (vorlon) wrote : Update Released | #5 |
The verification of the Stable Release Update for maas has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
John George (jog) wrote : | #6 |
I still get the same failure:
cdoqa@maas-
{"key": ["Invalid SSH public key: 'PosixPath' object has no attribute 'path'"]}
Looking at the installed code it appears one use of keypath.path was changed (i.e. line 139) but a second was not (i.e. line 149):
cdoqa@maas-
/usr/lib/
/usr/lib/
The following maas packages were installed from xenial-updates:
cdoqa@maas-
ii maas 2.0.0~rc2+
ii maas-cli 2.0.0~rc2+
ii maas-common 2.0.0~rc2+
ii maas-dhcp 2.0.0~rc2+
ii maas-dns 2.0.0~rc2+
ii maas-proxy 2.0.0~rc2+
ii maas-rack-
ii maas-region-api 2.0.0~rc2+
ii maas-region-
ii python3-django-maas 2.0.0~rc2+
ii python3-maas-client 2.0.0~rc2+
ii python3-
Trent Lloyd (lathiat) wrote : | #7 |
Also still seeing this issue
Changed in maas (Ubuntu Xenial): | |
status: | Fix Released → Confirmed |
james lee (lisartgun) wrote : | #8 |
solved like this.
/usr/lib/
("setsid", "-w", "ssh-keygen", "-i", "-f", str(keypath)),
Changed in maas (Ubuntu Xenial): | |
status: | Confirmed → Fix Committed |
status: | Fix Committed → Confirmed |
Changed in maas (Ubuntu Xenial): | |
milestone: | none → xenial-updates |
Michael Reed (mreed8855) wrote : | #9 |
I am also still seeing this error. The workaround in comment #8 does work.
Gavin Panella (allenap) wrote : | #10 |
> solved like this.
> /usr/lib/
> ("setsid", "-w", "ssh-keygen", "-i", "-f", str(keypath)),
FWIW, this exact fix is in ppa:maas/next. Not sure where else it's meant
to be right now.
FanFan (fkpwolf) wrote : | #11 |
MAAS Version 2.0.0 (rc2+bzr5156) still need workaround in comment #8.
Brandon B. Jozsa (bjozsa) wrote : | #12 |
the change that @allenap suggested worked perfectly for me. thank you for the workaround!
Andres Rodriguez (andreserl) wrote : Re: [Bug 1604128] Re: [2.0RC2] Unable to add a public SSH Key due to lp1604147 | #13 |
MAAS RC3 is available in ppa:MAAS/next
On Saturday, August 6, 2016, Brandon B. Jozsa <email address hidden> wrote:
> the change that @allenap suggested worked perfectly for me. thank you
> for the workaround!
>
> --
> You received this bug notification because you are subscribed to MAAS.
> https:/
>
> Title:
> [2.0RC2] Unable to add a public SSH Key due to lp1604147
>
> To manage notifications about this bug go to:
> https:/
>
--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer
tags: | added: sts |
after to add the maas/next and made the upgrade the situation is always the same, in attached the error when added the ssh key.
Alexander Gabert (alzxander) wrote : | #15 |
Alexander Gabert (alzxander) wrote : | #16 |
root@maas:~# dpkg -l | egrep 'python3.5|maas'
ii libpython3.5:amd64 3.5.2-2~16.01 amd64 Shared Python runtime library (version 3.5)
ii libpython3.
ii libpython3.
ii maas 2.0.0~rc2+
ii maas-cli 2.0.0~rc2+
rc maas-cluster-
ii maas-common 2.0.0~rc2+
ii maas-dhcp 2.0.0~rc2+
ii maas-dns 2.0.0~rc2+
ii maas-proxy 2.0.0~rc2+
ii maas-rack-
ii maas-region-api 2.0.0~rc2+
ii maas-region-
rc maas-region-
ii python3-django-maas 2.0.0~rc2+
ii python3-maas-client 2.0.0~rc2+
ii python3-
ii python3.5 3.5.2-2~16.01 amd64 Interactive high-level object-oriented language (version 3.5)
ii python3.5-minimal 3.5.2-2~16.01 amd64 Minimal subset of the Python language (version 3.5)
this machine went through do-release-upgrade from trusty to xenial after a fresh MAAS installation on 14.04 boot media.
Alexander Gabert (alzxander) wrote : | #17 |
maas/next and a reboot fixes this for me.
root@maas:~# dpkg -l | grep maas
ii maas 2.0.0~rc4+
ii maas-cli 2.0.0~rc4+
rc maas-cluster-
ii maas-common 2.0.0~rc4+
ii maas-dhcp 2.0.0~rc4+
ii maas-dns 2.0.0~rc4+
ii maas-proxy 2.0.0~rc4+
ii maas-rack-
ii maas-region-api 2.0.0~rc4+
ii maas-region-
rc maas-region-
ii python3-django-maas 2.0.0~rc4+
ii python3-maas-client 2.0.0~rc4+
ii python3-
root@maas:~# cat /etc/apt/
deb http://
# deb-src http://
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.