chef-cookbooks
chef-cookbooks copied to clipboard
nova keypair-show
Situtation: Add a keypair. Show key: nova keypair-show
Issue:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 737, in main
OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 673, in main
args.func(self.cs, args)
File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 2340, in do_keypair_show
keypair = cs.keypairs.get(args.keypair)
File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/keypairs.py", line 55, in get
return self._get("/os-keypairs/%s" % base.getid(keypair), "keypair")
File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 141, in _get
return self.resource_class(self, body[response_key], loaded=True)
File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 420, in __init__
self._add_details(info)
File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/keypairs.py", line 35, in _add_details
setattr(self, k, v)
AttributeError: can't set attribute
ERROR: can't set attribute
Already filed upstream: https://bugs.launchpad.net/python-novaclient/+bug/1223934
Looks like a known issue for the release notes: "nova keypair-show can fail. This is documented in python-novaclient bug 1223934."
verfied fixed
keypair-show Show details about the given keypair.
[root@node98-sat6-lab ~]# nova keypair-show key
+-------------+-------------------------------------------------+
| Property | Value |
+-------------+-------------------------------------------------+
| created_at | 2014-03-28T16:29:49.000000 |
| deleted | False |
| deleted_at | - |
| fingerprint | c1:c0:dd:82:0e:e1:a3:f7:0d:40:d9:db:6b:d2:07:aa |
| id | 1 |
| name | key |
| updated_at | - |
| user_id | admin |
+-------------+-------------------------------------------------+
Public key: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAmJuKctLcwbNUK8EqGAx1sahpFOXHxtn+nfufVZezseUvCBAZGVIbzFlovdeu6c4SdvQQvLeMyrFry11aejJ5+kH03OFBAVLsu2anQpw5C4WQDgRbJJljLHGlWthpxqj2qK0iarXRO82Mg2wypyAvHvBVSc9gmbLd9n8zRoVfiuFK/FzVRs5eU4ZNMmFiORd0R9eqpcyFifY9I165QMf+duMSAa/ofBh9hM0crFajZD1zV+it31rn63C0w3PMBPSFeJcThj0LMgzG5k+B8diIPZmJLcsCbOydeSXLMn996bcZzZ9puaan0NmauOOYcfbfLz7rpWWi06fITtszNzr35Q== Generated by Nova
Fixed on what package version?
This is not fixed on ubuntu, working on centos
The version of the novaclient in Ubuntu 12.04 is 2.15 and based on the policies of Ubuntu and the cloud archive team this will NOT be backported because the new LTS has already been released. As such, version 2.15 is the last version of the client that will be available via a package. To fix the client the User has only 1 supportable option. They will need to install the newer client version via pip.
pip install git+git://github.com/openstack/[email protected]
This needs to be doc'd
Installing via pip and pypi gets you 2.17.0. Is there a reason you specified 2.16.0 in your example?
@johnmarkschofield If you use the command specified in my last message you will have version 2.16 which installs python-novaclient from git but uses the released tag which is what is uploaded to pypi and is considered "stable". If you wanted to install version 2.16 from the pypi repos you would have to use the following command:
pip install python-novaclient==2.16.0
I specified version 2.16.0 from git because it was the first version that contained the keypair fix and is less likely to be deleted from the git repo where pypi repos are subject to lots of change. While version 2.17.0 should work without issues installing the latest client or service can cause stability problems. To minimize the possible impact, I've simply opted to install the the last release instead of the current release. No matter how we decide to document this update we need to be explicit in what we are installing.
@cloudnull Understood. Makes sense.