Validation on fails on the Associate Floating IP when too many instances exist

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

Bug Description

If there are more than Nova's pagination limit instances, and one tries to associate a floating IP with a new instance, the form's validation will fail.

This is because that form populates the drop-down field for association target differently on initial display of the form (where it takes the instance_id from the URL) than on submitting of that form (when the information from the URL is lost). The latter attempts to get all eligible ports, but is limited by Nova's pagination.

You can also observe weird behavior when that form has any error (for instance, because the floating IP wasn't selected) — after submitting, it will re-display the form with the error, but now the target drop-down will be populated with all possible ports, instead of only ones on the instance, like on the initial display.

Revision history for this message
Vishal Manchanda (vishalmanchanda) wrote :
Changed in horizon:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 19.2.0

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/782421
Committed: https://opendev.org/openstack/horizon/commit/8e69282bf4491a1a49bd0d0cc05bbaf835095998
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 8e69282bf4491a1a49bd0d0cc05bbaf835095998
Author: Radomir Dopieralski <email address hidden>
Date: Tue Mar 16 17:09:21 2021 +0100

    Save instace_id inside Associate Floating IP workflow

    Also, rename instance_id field to proper port_id.

    Before this change, when instance_id was passed from the Instances
    page in the URL, the information would be lost on form submission,
    and if the form contained an error, the it would be redisplayed with
    the port drop-down containing all ports from all instances. This also
    made submitting this form slow, as the drop-down would be populated
    with all ports on form validation.

    It also creates a bug, where if there are more instances than Nova's
    pagination allows, the ports from newer instances would no longer
    appear in the drop-down, and the form would fail to validate, even
    though the choice of port on initial form was correct.

    Closes-bug: #1920010
    Change-Id: I3ab26c19dc9ea1ed23fcff790d0db919039099eb
    (cherry picked from commit 3d82d57353d1a29fb5b568ffaa93db86998e9d94)

tags: added: in-stable-victoria
tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/782422
Committed: https://opendev.org/openstack/horizon/commit/64024e9f52be6fa16c27697fec852f38c6ae2816
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 64024e9f52be6fa16c27697fec852f38c6ae2816
Author: Radomir Dopieralski <email address hidden>
Date: Tue Mar 16 17:09:21 2021 +0100

    Save instace_id inside Associate Floating IP workflow

    Also, rename instance_id field to proper port_id.

    Before this change, when instance_id was passed from the Instances
    page in the URL, the information would be lost on form submission,
    and if the form contained an error, the it would be redisplayed with
    the port drop-down containing all ports from all instances. This also
    made submitting this form slow, as the drop-down would be populated
    with all ports on form validation.

    It also creates a bug, where if there are more instances than Nova's
    pagination allows, the ports from newer instances would no longer
    appear in the drop-down, and the form would fail to validate, even
    though the choice of port on initial form was correct.

    Closes-bug: #1920010
    Change-Id: I3ab26c19dc9ea1ed23fcff790d0db919039099eb
    (cherry picked from commit 3d82d57353d1a29fb5b568ffaa93db86998e9d94)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/train)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/782423
Committed: https://opendev.org/openstack/horizon/commit/2d2f944e2fe127433f2973ef77ba86ec997cf434
Submitter: "Zuul (22348)"
Branch: stable/train

commit 2d2f944e2fe127433f2973ef77ba86ec997cf434
Author: Radomir Dopieralski <email address hidden>
Date: Tue Mar 16 17:09:21 2021 +0100

    Save instace_id inside Associate Floating IP workflow

    Also, rename instance_id field to proper port_id.

    Before this change, when instance_id was passed from the Instances
    page in the URL, the information would be lost on form submission,
    and if the form contained an error, the it would be redisplayed with
    the port drop-down containing all ports from all instances. This also
    made submitting this form slow, as the drop-down would be populated
    with all ports on form validation.

    It also creates a bug, where if there are more instances than Nova's
    pagination allows, the ports from newer instances would no longer
    appear in the drop-down, and the form would fail to validate, even
    though the choice of port on initial form was correct.

    Closes-bug: #1920010
    Change-Id: I3ab26c19dc9ea1ed23fcff790d0db919039099eb
    (cherry picked from commit 3d82d57353d1a29fb5b568ffaa93db86998e9d94)

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 18.3.4

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 18.6.3

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon train-eol

This issue was fixed in the openstack/horizon train-eol 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.