macvlan VIF reproduces neutron port when HostIP exception raised

Bug #1750332 reported by Eunsoo Park
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr-kubernetes
Fix Released
High
Eunsoo Park

Bug Description

When get_parent_port failed because pod is not initialized but just scheduled (No HostIP inserted to POD status), exception is raised.

Refer to this code:
def _get_parent_port(self, neutron, pod):
        try:
            # REVISIT(vikasc): Assumption is being made that hostIP is the IP
            # of trunk interface on the node(vm).
            node_fixed_ip = pod['status']['hostIP']
        except KeyError:
            if pod['status']['conditions'][0]['type'] != "Initialized":
                LOG.debug("Pod condition type is not 'Initialized'")

            LOG.error("Failed to get parent vm port ip")
            raise

NestedVLAN does not create port before getting parent port, therefore it's not a bug.
However, request_vif() of NestedMacvlanPodVIFDriver requests neutron port before getting parent port.
It creates a bug in that the neutron port is not deleted after exception.

Refer to https://github.com/openstack/kuryr-kubernetes/blob/master/kuryr_kubernetes/controller/drivers/nested_macvlan_vif.py#L38

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kuryr-kubernetes (master)

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

Changed in kuryr-kubernetes:
assignee: nobody → Eunsoo Park (esevan.park)
status: New → In Progress
Changed in kuryr-kubernetes:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr-kubernetes (master)

Reviewed: https://review.openstack.org/545760
Committed: https://git.openstack.org/cgit/openstack/kuryr-kubernetes/commit/?id=716909decbdd8dd9b02090672bfdf54c2fa071df
Submitter: Zuul
Branch: master

commit 716909decbdd8dd9b02090672bfdf54c2fa071df
Author: Eunsoo Park <email address hidden>
Date: Mon Feb 19 16:33:54 2018 +0900

    NestedMacvlanPodVIFDriver gets host port before request vif

    This commit changes macvlan driver to get host port before
    request vif to neutron.

    Change-Id: I403609b824aa72184836dacfac09a312698afe78
    Closes-Bug: 1750332
    Signed-off-by: Eunsoo Park <email address hidden>

Changed in kuryr-kubernetes:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kuryr-kubernetes (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/552446

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr-kubernetes (stable/queens)

Reviewed: https://review.openstack.org/552446
Committed: https://git.openstack.org/cgit/openstack/kuryr-kubernetes/commit/?id=109040f3e7ed993317e0de3daf56bebf2b558f7b
Submitter: Zuul
Branch: stable/queens

commit 109040f3e7ed993317e0de3daf56bebf2b558f7b
Author: Eunsoo Park <email address hidden>
Date: Mon Feb 19 16:33:54 2018 +0900

    NestedMacvlanPodVIFDriver gets host port before request vif

    This commit changes macvlan driver to get host port before
    request vif to neutron.

    Change-Id: I403609b824aa72184836dacfac09a312698afe78
    Closes-Bug: 1750332
    Signed-off-by: Eunsoo Park <email address hidden>
    (cherry picked from commit 716909decbdd8dd9b02090672bfdf54c2fa071df)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kuryr-kubernetes 0.4.2

This issue was fixed in the openstack/kuryr-kubernetes 0.4.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kuryr-kubernetes 0.5.0

This issue was fixed in the openstack/kuryr-kubernetes 0.5.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.