Handlers fail to update resources when unrelevant changes happened to the resource

Bug #1662448 reported by Antoni Segura Puimedon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr-kubernetes
Fix Released
High
Ilya Chukhnakov

Bug Description

Between the time we receive an event with its resource information and the time we push an update to the API resource the resourceVersion may have changed due to changes that change in no way how we should be handling the resource.

We should be able to handle this case by checking that the relevant annotations did not change in a way that affects the handler work and push successfully on those cases.

Changed in kuryr-kubernetes:
status: New → Confirmed
assignee: nobody → Ilya Chukhnakov (ichukhnakov)
importance: Undecided → High
Changed in kuryr-kubernetes:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr-kubernetes (master)

Reviewed: https://review.openstack.org/422946
Committed: https://git.openstack.org/cgit/openstack/kuryr-kubernetes/commit/?id=24b8cc53c281aa726bd0c73c254793144fcb3058
Submitter: Jenkins
Branch: master

commit 24b8cc53c281aa726bd0c73c254793144fcb3058
Author: Ilya Chukhnakov <email address hidden>
Date: Fri Jan 20 03:49:24 2017 +0300

    Resolve 'resourceVersion' conflicts

    It is possible for K8s resource to be updated while it is being
    processed by Kuryr handler. As a result K8sClient will fail to
    update annotations after the handler finishes its work due to the
    'resourceVersion' conflict.

    This patch updates K8sClient to allow annotation updates with
    conflicting 'resourceVersion' if the updated annotations do not
    conflict with the current state (i.e. annotations are either new
    or have the same value as in the current state of the object).

    Change-Id: I6db14169bf8d6a8114a991bca9c220e15fccdce4
    Co-Authored-By: Antoni Segura Puimedon <email address hidden>
    Closes-Bug: #1662448

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