[RFE] Add interface attach API

Bug #1582188 reported by Sam Betts
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Wishlist
Vasyl Saienko

Bug Description

We are adding pluggable network interfaces to Ironic, these interfaces will be configurable per Ironic node, this means that different nodes might have different ways of handling their network interfaces.

Currently we use an Ironic port update to assign neutron ports to Ironic ports using their extra field, doing the mapping this way may not work for a third party network interface implementation. This also ties the ironic nova virt driver to a particular network interface mapping implementation.

To solve this problem I propose to add 2 two new API endpoints interface-attach and interface-detach:

POST v1/nodes/<node_id>/interface-attach
POST v1/nodes/<node_id>/interface-detach

These API end points will take via a POST body, a JSON representation of a generic VIF object. Making it generic allows for non-neutron based implementations to use this API. This VIF object will be passed to new functions in the pluggable network interfaces:

def interface-attach(self, vif):
    ...

def interface-detach(self, vif):
    ...

The network interface can use these functions to handle attaching the vif to the Ironic node in which ever way it needs to for its implementation, this may be adding a field to the Ironic port as with the existing implementation, or it might be different.

The ironic nova virt driver will be updated to use this new API in the plug_vifs and unplug_vifs functions, unbinding it from the underlying implementation details.

Tags: rfe-approved
Sam Betts (sambetts)
description: updated
Revision history for this message
Mathieu Mitchell (mat128) wrote :

+1

Revision history for this message
Dmitry Tantsur (divius) wrote :

An API addition usually requires a spec, so please propose one.

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

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

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

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

tags: added: needs-spec
Revision history for this message
Sam Betts (sambetts) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-specs (master)

Reviewed: https://review.openstack.org/317636
Committed: https://git.openstack.org/cgit/openstack/ironic-specs/commit/?id=748f0a76146fa8da833819ac900267e5725aaeb3
Submitter: Jenkins
Branch: master

commit 748f0a76146fa8da833819ac900267e5725aaeb3
Author: Sam Betts <email address hidden>
Date: Tue May 17 18:20:06 2016 +0100

    Add spec for interface attach and detach API

    Change-Id: I94044b34b27d313127cfcc60539321589f6f8287
    Partial-Bug: #1582188
    APIImpact: Adds new interface-attach and interface-detach APIs endpoints

tags: added: rfe-approved
removed: needs-spec rfe
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

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

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

Changed in ironic:
assignee: Sam Betts (sambetts) → Vasyl Saienko (vsaienko)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/327046
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=9088891ce72081684761e5cf54d3b3eabab0ca37
Submitter: Jenkins
Branch: master

commit 9088891ce72081684761e5cf54d3b3eabab0ca37
Author: Sam Betts <email address hidden>
Date: Wed Nov 30 18:29:04 2016 +0000

    Add Virtual Network Interface Driver APIs

    This patch adds the driver API interfaces for the virtual network
    interface API in order to abstract the task of assigning logical network
    interfaces to physical network interfaces.

    Since the OpenStack Newton release, Ironic provides an interface for
    pluggable network implementations. Different network implementations may
    want to handle how logical to physical network interface assignment
    happens. To do this the new API calls into new functions on the network
    implementation loaded for the specified node.

    This is part 1 of 3, and adds four new functions vif_attach, vif_detach,
    vif_list, port_changed, portgroup_changed, get_current_vif to the base
    network interface class, which should be overridden by network interface
    implementations.

    DHCP provider update_mac_address method was deprecated, network
    interface port_changed() and portgroup_changed() should be used instead.

    Co-Authored-By: Vasyl Saienko (<email address hidden>)
    Change-Id: I0b84cfd85557d18254697f2e539c583ea0f8e88c
    Partial-Bug: #1582188
    Closes-Bug: #1158684

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

Reviewed: https://review.openstack.org/404239
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=01374adc2fadb9bada6d14c0ba476d8b5b6b6e93
Submitter: Jenkins
Branch: master

commit 01374adc2fadb9bada6d14c0ba476d8b5b6b6e93
Author: Sam Betts <email address hidden>
Date: Wed Nov 30 18:31:06 2016 +0000

    Add Virtual Network Interface RPC APIs

    This patch adds the RPC API interfaces for the virtual network
    interface API in order to abstract the task of assigning logical network
    interfaces to physical network interfaces.

    Since the OpenStack Newton release, Ironic provides an interface for
    pluggable network implementations. Different network implementations may
    want to handle how logical to physical network interface assignment
    happens. To do this the new API calls into new functions on the network
    implementation loaded for the specified node.

    This is part 2 of 3, and adds vif_attach, vif_detach and vif_list
    functions to the conductor manager and RPC API classes.

    Co-Authored-By: Vasyl Saienko (<email address hidden>)
    Change-Id: I6c5a50016d12ad88b3c8175bc9b665e325e8df66
    Partial-Bug: #1582188

Changed in ironic:
assignee: Vasyl Saienko (vsaienko) → Sam Betts (sambetts)
Changed in ironic:
assignee: Sam Betts (sambetts) → Vasyl Saienko (vsaienko)
Changed in ironic:
assignee: Vasyl Saienko (vsaienko) → Vladyslav Drok (vdrok)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/404240
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=4789d3b41ad045f201351ea40097dfd895bfc8a9
Submitter: Jenkins
Branch: master

commit 4789d3b41ad045f201351ea40097dfd895bfc8a9
Author: Sam Betts <email address hidden>
Date: Wed Nov 30 18:43:35 2016 +0000

    Add Virtual Network Interface REST APIs

    This patch adds the REST APIs for the virtual network interface API in
    order to abstract the task of assigning logical network interfaces to
    physical network interfaces.

    Since Newton Ironic provides an interface for pluggable network
    implementations. Different network implementations may want to handle
    how logical to physical network interface assignment happens. To do this
    the new API calls into new functions on the network implementation
    loaded for the specified node.

    This is part 3 of 3, and adds the node vif subcontroller to expose the
    /nodes/<ident>/vifs REST API endpoint. API version is bumped to 1.28.

    Co-Authored-By: Vasyl Saienko (<email address hidden>)
    Change-Id: I70f1166a15a26f392734e21d6bc30a03da4e5486
    Partial-Bug: #1582188

Changed in ironic:
assignee: Vladyslav Drok (vdrok) → Vasyl Saienko (vsaienko)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ironic (master)

Reviewed: https://review.openstack.org/406915
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=b83af0d65a9a06691a6e9bd716b9f17fff0856ed
Submitter: Jenkins
Branch: master

commit b83af0d65a9a06691a6e9bd716b9f17fff0856ed
Author: Vasyl Saienko <email address hidden>
Date: Mon Dec 5 14:23:08 2016 +0200

    Allow to attach/detach VIF to portgroup

    With this patch port groups are activated in Ironic.
    When attaching a VIF to a node, it is attached to the first
    free port group. If there are no free port groups, the first
    available port (pxe_enabled has higher priority) is used
    instead.

    Related-Bug: #1618754
    Related-Bug: #1582188
    Co-Authored-By: Vladyslav Drok <email address hidden>
    Change-Id: I0dca2c2d98184e370c08c3e05aa3edadead869af

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/414590
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=77d1537d406b089296dcf2960de10bde6f9c4b14
Submitter: Jenkins
Branch: master

commit 77d1537d406b089296dcf2960de10bde6f9c4b14
Author: Vasyl Saienko <email address hidden>
Date: Fri Dec 23 12:34:58 2016 +0000

    Add VIFs attach/detach to api-ref

    This patch updates api-ref documentation with VIF attach/detach
    changes that were added in API microversion 1.28.

    Closes-Bug: #1582188
    Change-Id: I2950a1a356ccb3feb7a4c6335eb95a7a52b3266a

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to ironic (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/424723

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-tempest-plugin (master)

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

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

This issue was fixed in the openstack/ironic 7.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic-tempest-plugin (master)

Change abandoned by John L. Villalovos (<email address hidden>) on branch: master
Review: https://review.openstack.org/427428
Reason: Restarting the process

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

Change abandoned by John L. Villalovos (<email address hidden>) on branch: master
Review: https://review.openstack.org/427428
Reason: Will work with infra to do a batch upload.

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.