Skip to content

e2e: cozyreport keys satellite files by node, so a second pod on the same node overwrites the first one's output #4743

Open

Description

When two LINSTOR satellite pods run on the same node, cozyreport writes both of their reads into one file and the second pod wins. That happens during a DaemonSet rollout, while the old pod is still Terminating next to the new one.

The satellite loop in hack/cozyreport.sh (main, L2097-L2117) names each pod's output after its .spec.nodeName, as linstor/error-reports/<node>.tgz. cozyreport_read_exec opens its target with >, so the later pod in the list truncates what the earlier one wrote. If the later one is the Terminating pod, its container not found error replaces a good bundle. The comment above the loop says a collision would still land in a distinct file. That holds only for the pod-name fallback, not for two pods that report the same node.

The per-node ZFS listing from #4657, linstor/zfs/<node>.txt, uses the same key, so it has the same problem once that PR merges.

Nothing in the loop notices that a node's file was already written in this run. The fix belongs in the loop, so both files get it at once: skip pods with deletionTimestamp set, or fall back to the pod name when a second pod maps to a node already seen. The lanes don't roll satellites during collection today, so this is unlikely to bite in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions