CRD podSelector is not properly updated on NP update

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

Bug Description

When the podSelector of a NP is updated, the podSelector on the respective CRD must also be updated.
However, this field is only updated on new labels addition, and should be updated whenever an event on the podSelector occurs, regardless if it's addition/update/deletion. So, the strategy of update being used is merged when should be replaced.

Changed in kuryr-kubernetes:
importance: Undecided → High
status: New → Triaged
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/636590

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

Reviewed: https://review.openstack.org/636590
Committed: https://git.openstack.org/cgit/openstack/kuryr-kubernetes/commit/?id=5cf4b4177254272cd15885411194d033a188c0d7
Submitter: Zuul
Branch: master

commit 5cf4b4177254272cd15885411194d033a188c0d7
Author: Maysa Macedo <email address hidden>
Date: Wed Feb 13 10:45:37 2019 +0000

    Fix CRD podSelector update

    When the podSelector of a NP is updated, the podSelector
    on the respective CRD must also be updated with the same
    value. However, this do not happen in case the field of a label
    is updated, for example: Label {'app: demo'} is updated to
    {'context:demo'} the result given is {'app: demo', 'context:demo'}
    when should be {'context:demo'}. And after that, if the updated label
    {'context:demo'} is removed from the NP, it will not be removed from the CRD.
    These cases happen because the podSelector field is a dict and not
    a list.

    This commit fixes the issue by changing the merge strategy to
    JSON Patch, instead of JSON Merge Patch.

    Change-Id: Ic629c1ba4ac13c2bfaffdf7f904b69abf9521ed3
    Closes-Bug: 1810394

Changed in kuryr-kubernetes:
status: In Progress → Fix Released
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.

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.