Bug 958041 - Horizon throws an invalid error when downloading a keypair that wasn't saved
Summary: Horizon throws an invalid error when downloading a keypair that wasn't saved
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 2.1
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
: 6.0 (Juno)
Assignee: Matthias Runge
QA Contact: Ami Jeain
URL:
Whiteboard:
: 1023982 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-30 08:41 UTC by Ami Jeain
Modified: 2019-09-10 14:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-03 09:08:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1182797 0 None None None Never

Description Ami Jeain 2013-04-30 08:41:27 UTC
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:

Comment 2 Matthias Runge 2013-05-22 08:43:02 UTC
Launchpad bug https://bugs.launchpad.net/horizon/+bug/1182797

I can reproduce this bug.

Comment 3 Matthias Runge 2013-10-29 07:24:57 UTC
*** Bug 1023982 has been marked as a duplicate of this bug. ***

Comment 4 Alvaro Lopez Ortega 2013-11-13 10:09:55 UTC
Liz, could you please give a hand with this? We'd need to know what to do with the download link.

Comment 5 Julie Pichon 2013-11-13 13:50:42 UTC
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).

Comment 6 Liz 2013-11-13 22:07:50 UTC
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

Comment 7 Matthias Runge 2013-11-14 09:12:08 UTC
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.

Comment 8 Liz 2013-11-14 21:18:39 UTC
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

Comment 9 Matthias Runge 2013-11-25 08:58:54 UTC
we only know, the process of generating the keypair has been started. What the user did with the data-stream is unknown to us.

Comment 10 Nir Magnezi 2014-01-08 13:04:56 UTC
This bug repoduces with RDO Icehouse: python-django-horizon-2014.1-0.1b1.el6.noarch


Note You need to log in before you can comment on or make changes to this bug.