Inconsistent simple_ip_management behavior with Neutron

Bug #1226003 reported by Sandro Mathys
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Akihiro Motoki

Bug Description

Neutron does not (yet?) support the mechanism behind simple_ip_management (see e.g. https://bugs.launchpad.net/horizon/+bug/1196541). But it seems Horizon is only checking for support when associating a floating IP, but not when disassociating it. Association will show the non-simple behavior ("pick your IP") but Disassociation will show simple behavior ("disassociate and release immediately").

Thus, the behavior is highly inconsistent, if Neutron is used for Networking and simple_ip_management is on (default).

Tags: neutron
Julie Pichon (jpichon)
Changed in horizon:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Julie Pichon (jpichon) wrote :

Agreed, this is inconsistent and should be fixed. If simple_associate is not supported, simple_disassociate probably shouldn't be enabled either.

https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/instances/tables.py#L375
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/instances/tables.py#L404

Additionally, the docs as of now only document the effect of "simple_ip_management" in terms of associating IPs; what it does with disassociation should also be explained: that is, "Simple Disassociation" means both disassociating *and* releasing the floating IP in one click.

http://docs.openstack.org/developer/horizon/topics/settings.html#simple-ip-management

tags: added: neutron
Revision history for this message
Rob Raymond (rob-raymond) wrote :

The inconsistency part was fixed by Bug #1247245

Is that sufficient to close this bug as well?

Revision history for this message
Julie Pichon (jpichon) wrote :

I think it would be more consistent to not allow any of the "simple" behaviour if part of it doesn't work - so no SimpleDisassociate if SimpleAssociate doesn't work.

At some point we're going to want a proper non-simple 'Disassociate' that works with Neutron in order to allow people to remove an IP of their choice, rather than just the last one assigned (current 'simple' behaviour). But in the meantime, being consistent with either having all of the simple_ip_management behaviour or none of it, would make more sense to me.

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

I've spoken with part of Neutron team and it seems that simple_ip_management won't make it to Neutron soon (or won't make it at all), so I propose implementing kind of 'Disassociate IP' functionality (opposing 'Simple Disassociate IP') in Horizon.

I have the following scenario off the top of my head:
* user presses 'Disassociate IP' button
* he is redirected to horizon:project:access_and_security:floating_ips, where only IPs for a given Instance are shown (not quite sure whether it's possible, but worth a try)
* user disassociates the right IP
* and returns to Instances table manually

According to IRC discussion with Julie Pichon, that scenario seems reasonable, so I'm starting implementing it.

Changed in horizon:
assignee: nobody → Timur Sufiev (tsufiev-x)
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

There is at least one problem with implementing the scenario proposed above: table filtering is done via POST request (not GET), thus it's impossible to filter the table once the user is redirected to it. Redirecting to a Floating IP table where IPs for all instances are shown (and not only for the VM we want to deassociate IP from) doesn't seem like a good option. I've created a separate blueprint for changing POST-filtering -> GET-filtering https://blueprints.launchpad.net/horizon/+spec/table-filtering-via-get

Revision history for this message
Julie Pichon (jpichon) wrote :

Timur, to clarify: rather than trying another approach, this is currently waiting for the blueprint to be implemented first? (Blueprint which is superseded by bug 1368338 [currently in progress], if I understand correctly.)

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Julie, exactly: I'm waiting for the implementation of tables GET-filtering instead of POST. I've just reviewed Paul's commit at https://review.openstack.org/#/c/128253/ - it's already working with non-paginated data, though need some more efforts to work fine with paginated data.

Revision history for this message
Julie Pichon (jpichon) wrote :

Cool, thanks for the update!

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/136456

Changed in horizon:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/136456
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Timur Sufiev (<email address hidden>) on branch: master
Review: https://review.openstack.org/136456
Reason: The patch doesn't seem to be aligned with where the community is heading to. I anticipate this will be done in a simpler and more elegant way in a new beautiful Angular world.

Timur Sufiev (tsufiev-x)
Changed in horizon:
assignee: Timur Sufiev (tsufiev-x) → nobody
status: In Progress → Triaged
Revision history for this message
Akihiro Motoki (amotoki) wrote :

The other reason we haven't implemented 'simple FIP disassociation' is because there is a possibility that a server has multiple floating IP associated (two neutron ports have floating IPs respectively). This is not a usual case but the neutron API allows it.

One important aspect of this bug is to allow users to release a floating IP associated when disassociating the floating IP. One idea in my mind is to show a form "Disassociate floating IP" to confirm the floating IP to be disassociated and provide a checkbox to specify whether the floating IP should be released at the same time. This requires two clicks but I believe it is a good compromise.

Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
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/516417

Changed in horizon:
status: Triaged → In Progress
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → queens-3
Ying Zuo (yingzuo)
Changed in horizon:
milestone: queens-3 → queens-rc1
Ying Zuo (yingzuo)
Changed in horizon:
milestone: queens-rc1 → queens-rc2
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This is a mini feature. Bumping it to Rocky-1.

Changed in horizon:
milestone: queens-rc2 → rocky-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/516417
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=dd0eba2128a892bddef563b09e4a28122c50f458
Submitter: Zuul
Branch: master

commit dd0eba2128a892bddef563b09e4a28122c50f458
Author: Akihiro Motoki <email address hidden>
Date: Mon Oct 30 18:09:44 2017 +0000

    Support simple FIP disassociation (with FIP release)

    We previously supported so-called "Simple FIP disassociation"
    which allows users to disassociate and release a FIP in a single action.
    We no longer support nova-network based features, but I believe it is worth
    implemented even in a neutron-only era. This patch introduces a checkbox
    "Release floating IP" to support this with neutron.

    At the same time, this patch also fixes a bug that the existing FIP
    disassociation action disassociates and releases a first FIP of
    a requested server. Even though it is a rare case where a single
    server has multiple FIPs, this is a bug. After this patch, FIPs
    associated with the requested server are listed in the form and
    a user can select an FIP to be disassociated.

    This patch drops a setting parameter 'simple_ip_management' without
    deprecation notice. This is actually no side effect because this setting
    just toggled the FIP disassociate action in the instance table and
    it provides nothing more than that. We can do the same thing by
    the policy file.

    Change-Id: Ie8053bdd3a3e4c7897c7c906788d40c2a1d3f708
    Closes-Bug: #1226003

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 14.0.0.0b1

This issue was fixed in the openstack/horizon 14.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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