keypairs can not have an '@' sign in the name

Bug #1265563 reported by Matthias Runge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Matthias Runge
Havana
Fix Released
Low
Matthias Runge

Bug Description

when importing a keypair and naming the keypair like "<email address hidden>":

you get the error "Unable to import keypair."
while the message from keystone is more clear:

DEBUG:urllib3.connectionpool:"POST /v2/6ebbe9474cf84bfbb42b5962b6b7e79f/os-keypairs HTTP/1.1" 400 108
RESP: [400] CaseInsensitiveDict({'date': 'Thu, 02 Jan 2014 16:31:28 GMT', 'content-length': '108', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-86527df6-1dd6-4232-964d-0401332baa78'})
RESP BODY: {"badRequest": {"message": "Keypair data is invalid: Keypair name contains unsafe characters", "code": 400}}

message": "Keypair data is invalid: Keypair name contains unsafe characters", "code": 400}}

we should return this message or try to prevent this issue at all.

Changed in horizon:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/64803

Changed in horizon:
assignee: nobody → Matthias Runge (mrunge)
status: Confirmed → In Progress
Matthias Runge (mrunge)
Changed in horizon:
milestone: none → icehouse-2
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/64803
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=eafe0b260d24f65d6f0b0487a74c352a01a53d84
Submitter: Jenkins
Branch: master

commit eafe0b260d24f65d6f0b0487a74c352a01a53d84
Author: Matthias Runge <email address hidden>
Date: Fri Jan 3 10:31:13 2014 +0100

    unify keypair name handling

    CreateKeyPair and ImportKeypair handled name checks in a different
    way. When importing a keypair, one got a generic error message
    without a hint, that the name was wrong.

    Change-Id: Ie82c0cd21f70aae3f55b84a1c05c9f170eaec312
    Closes-Bug: #1265563

Changed in horizon:
status: In Progress → Fix Committed
Matthias Runge (mrunge)
tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/65059

Julie Pichon (jpichon)
tags: removed: havana-backport-potential
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/havana)

Reviewed: https://review.openstack.org/65059
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=cf0942e76370855d0580209d35f3271f49984edc
Submitter: Jenkins
Branch: stable/havana

commit cf0942e76370855d0580209d35f3271f49984edc
Author: Matthias Runge <email address hidden>
Date: Fri Jan 3 10:31:13 2014 +0100

    unify keypair name handling

    CreateKeyPair and ImportKeypair handled name checks in a different
    way. When importing a keypair, one got a generic error message
    without a hint, that the name was wrong.

    This is the backport to Havana.

    Managed to drop the original changei, which was
    Ie82c0cd21f70aae3f55b84a1c05c9f170eaec312

    Closes-Bug: #1265563
    (cherry picked from commit eafe0b260d24f65d6f0b0487a74c352a01a53d84)

    Change-Id: I10d5a7151242afeeed59965b361c89cc97b53b46

Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.