Description of problem: Horizon throws the following error message doing the following sequence: Error: Unable to create keypair: Key pair 'abc' already exists. (HTTP 409) (Request-ID: req-26876bc9-dcb6-4d5c-ad30-9995c2e2da11) Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. go to Access & Security page 2. under the Keypairs section, hit on "Create a keypair" and give it a name and click on Create Keypair 3. hit cancel on the "Save As.." window, to not save the *.pem file 4. click on the "Download keypair xxx" link Actual results: Error: Unable to create keypair: Key pair 'abc' already exists. (HTTP 409) (Request-ID: req-26876bc9-dcb6-4d5c-ad30-9995c2e2da11) Expected results: not sure what is the exact behavior should be but obviously the above erorr should not appear. Additional info:
Launchpad bug https://bugs.launchpad.net/horizon/+bug/1182797 I can reproduce this bug.
*** Bug 1023982 has been marked as a duplicate of this bug. ***
Liz, could you please give a hand with this? We'd need to know what to do with the download link.
The technical constraint being that the download can only be offered once, as Nova will only generate the keypair once. There was a suggestion of perhaps removing the "Download this keypair..." link to avoid someone trying to click it again (we'll need to check if there's still a way for people to then download their keypair with Javascript disabled then).
Hi All, When I test this, it looks like we are just letting the user know that they can't download it again since they've already downloaded it. So, I see two directions we could go with the solution: 1) We let the user know that they can't Download the keypair since it has already been successfully downloaded. We should use a modal window to show this information using the style that the "Delete Keypair" confirmation modal uses and give the user one option of "OK" to close it. 2) We allow the user to overwrite the current file if they wish. Upon clicking the "Download" link, the user should be notified in a modal window using the same look and feel as the "Delete Keypair" confirmation modal window letting them know that they've already downloaded this keypair and asking if they want to overview the current one. The options could be Overwrite or Cancel. I'm not sure if there are technical reasons to either allow the user to overview the keypair or not, but I would expect we should allow the user to re-download the keypair at any time to overview the current one. In any case, the confusing error message that the user sees today would not be shown. My thoughts! Liz
Liz, we can not know, if the keypair has been saved successfully at the clients host. The inital keypair contains a secret, which is not saved anywhere besides the client computer. So, you can not re-download the keypair, but just generate a new one. When thinking about that, it seems we should just remove the download link as it's misleading there.
Matthias, Thanks for the additional information. So it seems that somehow we know if the file has already been downloaded based on the error message that exists today. Could we just surface this to the user when they click the "Download" link in a modal window? I guess my concern of getting rid of the link would be ho would the user then download this keypair if the initial download didn't work? They would then have to try to create a new one in hopes that it would trigger properly? Thanks, Liz
we only know, the process of generating the keypair has been started. What the user did with the data-stream is unknown to us.
This bug repoduces with RDO Icehouse: python-django-horizon-2014.1-0.1b1.el6.noarch