Skip to content

fix: create logs PVC eagerly to avoid init-job scheduling deadlock - #2

Open
Kreibich04 wants to merge 1 commit into
alterway:mainfrom
Kreibich04:fix/logs-pvc-init-deadlock-upstream
Open

fix: create logs PVC eagerly to avoid init-job scheduling deadlock#2
Kreibich04 wants to merge 1 commit into
alterway:mainfrom
Kreibich04:fix/logs-pvc-init-deadlock-upstream

Conversation

@Kreibich04

Copy link
Copy Markdown

The Init/Upgrade/ModulesUpdate Jobs and the StatefulSet all mount -logs-pvc by name whenever the log volume is enabled (the default), but that PVC was only ever created lazily inside reconcileStatefulSet's own logic - which itself only runs after the Init Job succeeds.

Since the Init Job's pod can never schedule without the PVC, it never succeeds, and the operator deadlocks forever with the pod stuck Pending and "persistentvolumeclaim ... not found".

Create the logs PVC in reconcilePVCs, alongside data/addons, so it exists before anything references it.

The Init/Upgrade/ModulesUpdate Jobs and the StatefulSet all mount
<name>-logs-pvc by name whenever the log volume is enabled (the
default), but that PVC was only ever created lazily inside
reconcileStatefulSet's own logic -- which itself only runs after the
Init Job succeeds. Since the Init Job's pod can never schedule without
the PVC, it never succeeds, and the operator deadlocks forever with
the pod stuck Pending and "persistentvolumeclaim ... not found".

Create the logs PVC in reconcilePVCs, alongside data/addons, so it
exists before anything references it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant