kuryr-daemon is not deleting pod information from in-memory registry

Bug #1750394 reported by Michal Dulko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr-kubernetes
Fix Released
Critical
Michal Dulko

Bug Description

kuryr-daemon keeps a list of pods in its memory. The list is currently not updated on pod's deletion leading to constantly increasing number of used memory.

We should either watch for deletes or prune the list periodically.

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/545944

Changed in kuryr-kubernetes:
assignee: nobody → Michal Dulko (michal-dulko-f)
status: New → In Progress
Changed in kuryr-kubernetes:
importance: Undecided → Critical
Revision history for this message
Michal Dulko (michal-dulko-f) wrote :

We've raised that to critical because we're realized that idea of never deleting from registry was built on false assumption that pod names will be unique for kuryr-daemon lifecycle. It's not true, names are unique only in given moment of time.

Not following this assumption breaks StatefulSet resources are they are reusing pod names (stset-0, stset-1, stset-2, etc.).

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/547071

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

Reviewed: https://review.openstack.org/545944
Committed: https://git.openstack.org/cgit/openstack/kuryr-kubernetes/commit/?id=89a8bd08b5f4ba3410d015ae0f71d10cf4f3b885
Submitter: Zuul
Branch: master

commit 89a8bd08b5f4ba3410d015ae0f71d10cf4f3b885
Author: Michał Dulko <email address hidden>
Date: Mon Feb 19 18:14:53 2018 +0100

    Delete pods from registry in CNI daemon

    Initial implementation of kuryr-daemon was only adding new pods to the
    in-memory registry and not deleting them. While the amount of data is
    tiny, it will accumulate over time and in practice be a memory leak. We
    should aim to prevent that, especially taking into account most recent
    efforts to base health checks on memory usage.

    This commit makes kuryr-daemon react to pod deletions with removals of
    pods from the in-memory registry.

    Change-Id: I45babc325b7a727d6a973717f6653a40503ad991
    Closes-Bug: 1750394

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

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

commit 9dbfac0e4375497f99791fce877d26416fce939d
Author: Michał Dulko <email address hidden>
Date: Mon Feb 19 18:14:53 2018 +0100

    Delete pods from registry in CNI daemon

    Initial implementation of kuryr-daemon was only adding new pods to the
    in-memory registry and not deleting them. While the amount of data is
    tiny, it will accumulate over time and in practice be a memory leak. We
    should aim to prevent that, especially taking into account most recent
    efforts to base health checks on memory usage.

    This commit makes kuryr-daemon react to pod deletions with removals of
    pods from the in-memory registry.

    Change-Id: I45babc325b7a727d6a973717f6653a40503ad991
    Closes-Bug: 1750394
    (cherry picked from commit 89a8bd08b5f4ba3410d015ae0f71d10cf4f3b885)

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

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