kuryr-libnetwork did not clean neutron port when use existed neutron network

Bug #1651015 reported by Liping Mao
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kuryr-libnetwork
Fix Released
Critical
Dongcan Ye

Bug Description

Problem:
when user use existed neutron network, kuryr-libnetwork will not delete the neutron port which is created for containers.

Reproduce Steps:
1. create neutron network and subnet
2. create kuryr network with this existed neutron network.
3. run a container, and delete the container.

Expect Result:
the neutron port which created from container is deleted after the container is deleted.

Actual Result:
the neutron port did not delete.

When ipamdriver release address, it will find the subnet according to poolid. This will assume the subnet need has subnetpool-id. When "existed neutron network" case, the network and subnet is pre-created by EndUser, which do not have subnetpool-id. and subnetpool-id is unchangable after the subnet is created. This will cause kuryr can't release the neutron port.

Liping Mao (limao)
summary: - kuryr-libnetwork did not clearn neutron port when use existed neutron
+ kuryr-libnetwork did not clean neutron port when use existed neutron
network
Changed in kuryr-libnetwork:
status: New → Confirmed
importance: Undecided → Critical
Dongcan Ye (hellochosen)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr-libnetwork (master)

Reviewed: https://review.openstack.org/412772
Committed: https://git.openstack.org/cgit/openstack/kuryr-libnetwork/commit/?id=4af7e1cdd821bbda0319251f1aae633a04573413
Submitter: Jenkins
Branch: master

commit 4af7e1cdd821bbda0319251f1aae633a04573413
Author: Dongcan Ye <email address hidden>
Date: Tue Dec 20 14:20:57 2016 +0800

    Delete port created by kuryr

    In current code, we get the port's subnet by checking the
    subnet's subnetpool_id equal with the given PoolID, but in
    existing environment, the subnet may lack subnetpool_id,
    hence we will not get the port's subnet and leaves the
    kuryr-libnetwork port undeleted.

    This patch checks the port's device owner and determines
    the given POOL's subnet_id and ip_address is equal to
    port's fixed_ips attribute.

    Change-Id: I736adbb2409b50a5e11d3aa7d31778944cfdeae1
    Co-Authored-By: Liping Mao <email address hidden>
    Closes-Bug: #1651015

Changed in kuryr-libnetwork:
status: Confirmed → Fix Released
Dongcan Ye (hellochosen)
Changed in kuryr-libnetwork:
assignee: nobody → Dongcan Ye (hellochosen)
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.