Unused members are not removed from pool

Bug #1812370 reported by Maysa de Macedo Souza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr-kubernetes
Fix Released
Undecided
Maysa de Macedo Souza

Bug Description

In the case when two ports with same targetport are created, if only one of the targetPorts is updated the unused member(s) from the respective pool is not removed and the new ones are added.

For example, if the following spec is applyed:

apiVersion: v1
kind: Service
metadata:
  name: demo-test2
spec:
  ports:
  - port: 80
    name: port-80
    protocol: TCP
    targetPort: 8080
  - port: 443
    name: port-443
    protocol: TCP
    targetPort: 8080
  selector:
    app: demo
  type: ClusterIP

and then the target port of one of them is modified, the resulted members will be:

$ openstack loadbalancer member list 950464ff-31fa-49da-ae56-2a7742d036cb
+--------------------------------------+------------------------------------+----------------------------------+---------------------+------------+---------------+------------------+--------+
| id | name | project_id | provisioning_status | address | protocol_port | operating_status | weight |
+--------------------------------------+------------------------------------+----------------------------------+---------------------+------------+---------------+------------------+--------+
| 73f07d84-65cc-4ba6-85b3-f4a8cf10fe3d | default/demo-58c4c6895c-rq5hx:8080 | 1d7834dbe86d4d3f81b697f95bec0c13 | ACTIVE | 10.0.0.208 | 8080 | NO_MONITOR | 1 |
| 9a849eec-b9bc-4bd3-94b2-97ac26e1f7dc | default/demo-58c4c6895c-khpvt:8080 | 1d7834dbe86d4d3f81b697f95bec0c13 | ACTIVE | 10.0.0.222 | 8080 | NO_MONITOR | 1 |
| 642ceb73-f82d-462c-a46c-fa86beb87bf3 | default/demo-58c4c6895c-rq5hx:8090 | 1d7834dbe86d4d3f81b697f95bec0c13 | ACTIVE | 10.0.0.208 | 8090 | NO_MONITOR | 1 |
| d3dd8189-555b-4810-a43f-7e73030e61b0 | default/demo-58c4c6895c-khpvt:8090 | 1d7834dbe86d4d3f81b697f95bec0c13 | ACTIVE | 10.0.0.222 | 8090 | NO_MONITOR | 1 |
+--------------------------------------+------------------------------------+----------------------------------+---------------------+------------+---------------+------------------+--------+

When should be:

$ openstack loadbalancer member list 950464ff-31fa-49da-ae56-2a7742d036cb
+--------------------------------------+------------------------------------+----------------------------------+---------------------+------------+---------------+------------------+--------+
| id | name | project_id | provisioning_status | address | protocol_port | operating_status | weight |
+--------------------------------------+------------------------------------+----------------------------------+---------------------+------------+---------------+------------------+--------+
| 642ceb73-f82d-462c-a46c-fa86beb87bf3 | default/demo-58c4c6895c-rq5hx:8090 | 1d7834dbe86d4d3f81b697f95bec0c13 | ACTIVE | 10.0.0.208 | 8090 | NO_MONITOR | 1 |
| d3dd8189-555b-4810-a43f-7e73030e61b0 | default/demo-58c4c6895c-khpvt:8090 | 1d7834dbe86d4d3f81b697f95bec0c13 | ACTIVE | 10.0.0.222 | 8090 | NO_MONITOR | 1 |
+--------------------------------------+------------------------------------+----------------------------------+---------------------+------------+---------------+------------------+--------+

If both targetPorts are updated with same value in the service spec the correct members are presented in the pool.

Changed in kuryr-kubernetes:
assignee: nobody → Maysa de Macedo Souza (maysa)
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/633995

Changed in kuryr-kubernetes:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr-kubernetes (master)

Reviewed: https://review.openstack.org/633995
Committed: https://git.openstack.org/cgit/openstack/kuryr-kubernetes/commit/?id=66faa8a38bdb2c00a1fb3fdc9a78e701841b47c1
Submitter: Zuul
Branch: master

commit 66faa8a38bdb2c00a1fb3fdc9a78e701841b47c1
Author: Maysa Macedo <email address hidden>
Date: Wed Jan 30 16:11:46 2019 +0000

    Fix unused members deletion

    Unused members are not being deleted from the pools. This commit
    fixes the issue by associating the current target ports with the pool,
    and removing the members not presented in these current targets.

    Change-Id: I60ce63d2d50daf9a1cea9897dae4926137fc2352
    Closes-Bug: #1812370

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/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/634895

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

Reviewed: https://review.openstack.org/634895
Committed: https://git.openstack.org/cgit/openstack/kuryr-kubernetes/commit/?id=7fb40442387baa3add9fea69f55a5e641d207c7e
Submitter: Zuul
Branch: stable/rocky

commit 7fb40442387baa3add9fea69f55a5e641d207c7e
Author: Maysa Macedo <email address hidden>
Date: Wed Jan 30 16:11:46 2019 +0000

    Fix unused members deletion

    Unused members are not being deleted from the pools. This commit
    fixes the issue by associating the current target ports with the pool,
    and removing the members not presented in these current targets.

    Change-Id: I60ce63d2d50daf9a1cea9897dae4926137fc2352
    Closes-Bug: #1812370
    (cherry picked from commit 66faa8a38bdb2c00a1fb3fdc9a78e701841b47c1)

tags: added: in-stable-rocky
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/634963

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

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

commit de4bf196d2938989ebf0a5d03e9e98a186c662aa
Author: Maysa Macedo <email address hidden>
Date: Wed Jan 30 16:11:46 2019 +0000

    Fix unused members deletion

    Unused members are not being deleted from the pools. This commit
    fixes the issue by associating the current target ports with the pool,
    and removing the members not presented in these current targets.

    Change-Id: I60ce63d2d50daf9a1cea9897dae4926137fc2352
    Closes-Bug: #1812370
    (cherry picked from commit 66faa8a38bdb2c00a1fb3fdc9a78e701841b47c1)

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

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

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

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

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

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