Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore kubectl error output when extracting current holder pod generation #155

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

simu
Copy link
Member

@simu simu commented Feb 27, 2024

This suppresses error messages like the following on installations which only have cephfs or rbd enabled, but not both.

Error from server (NotFound): daemonsets.apps "csi-rbdplugin-holder-cluster" not found

We don't care about the resulting value of the generation variable when the daemonset is missing, since we'll check an empty pod list for outdated pods in that case.

Additionally, we ensure that the holder-update DaemonSet pods are restarted when we modify the script by adding the script's md5sum as an annotation in the pod template.

Follow-up for #154

Checklist

  • The PR has a meaningful title. It will be used to auto-generate the
    changelog.
    The PR has a meaningful description that sums up the change. It will be
    linked in the changelog.
  • PR contains a single logical change (to build a better changelog).
  • Categorize the PR by adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog.
  • Link this PR to related issues or PRs.

…ration

This suppresses error messages like the following on installations which
only have cephfs or rbd enabled, but not both.

```
Error from server (NotFound): daemonsets.apps "csi-rbdplugin-holder-cluster" not found
```
@simu simu added the bug Something isn't working label Feb 27, 2024
@simu simu requested a review from a team February 27, 2024 08:56
@simu simu force-pushed the fix/restart-holder-suppress-error branch from 6bb2e3f to 9dbd393 Compare February 27, 2024 09:09
We add the script's md5sum as an annotation to the DaemonSet pod
template to force Kubernetes to recreate the pods when we modify the
script.

Additionally, we set `sync-wave=10` for the DaemonSet to ensure that the
ConfigMap changes are synced before the checksum annotation on the
DaemonSet is updated.
@simu simu force-pushed the fix/restart-holder-suppress-error branch from 9dbd393 to f4b5147 Compare February 27, 2024 09:10
@simu simu merged commit 83ab6f4 into master Feb 27, 2024
10 checks passed
@simu simu deleted the fix/restart-holder-suppress-error branch February 27, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants