Underscore is valid in key pair names, but the frontend says otherwise

Bug #1848383 reported by Victor Engmark
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Unassigned

Bug Description

How to reproduce:

1. Create a key pair with a name containing underscore using the API (in my case, using Terraform).
2. Try to create the same key pair in the dashboard.

What happens: The dashboard complains that the key pair name can't contain underscore.

What should happen: The dashboard should use exactly the same validation code as the API, and should therefore allow underscores in key pair names.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Cannot reproduce it in the master and stable/train.
Which release do you use?

Changed in horizon:
status: New → Incomplete
Revision history for this message
Akihiro Motoki (amotoki) wrote :

It looks like https://review.opendev.org/#/c/649899/ fixed it.
This is only contained in Train release.

It can be backported to prior stable branches.
Unfortunately there is no bug corresponding to it, so this bug can be used as a reference.

tags: added: stein-backport-potential
Revision history for this message
Akihiro Motoki (amotoki) wrote :

I proposed a backport https://review.opendev.org/689304 to stable/stein.

I don't plan to care more backports to older branches.
Anyone can propose backports to older branches following the stable branch policy.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

This does not exist in the master branch, so I am marking this as Invalid. Stable backports are valid.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

"Fix Released" sounds better.

Changed in horizon:
status: Incomplete → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/stein)

Reviewed: https://review.opendev.org/689304
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=4343aaa9a2aac370f2f32ecf24d5936982b91fc2
Submitter: Zuul
Branch: stable/stein

commit 4343aaa9a2aac370f2f32ecf24d5936982b91fc2
Author: pengyuesheng <email address hidden>
Date: Thu Apr 4 14:48:40 2019 +0800

    Modify the regex for name on import public key form

    This patch fix does not match the regex in horizon and nova [1].

    The service supports underscores, but the restriction imposed in horizon
    is different, so the regex is updated.

    [1] https://github.com/openstack/nova/blob/6ebb2c4cae65cb437e17a8c02fe5174a9825d8e0/nova/compute/api.py#L5674-L5690

    Closes-Bug: #1848383
    Change-Id: Icc5e9c6447253d6087c578ab931b52a923128e38
    (cherry picked from commit 42349acc2fa08cadb8d37616d0262838c4629039)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 15.2.0

This issue was fixed in the openstack/horizon 15.2.0 release.

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.