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

reconcile: do not resize volume if failed to get inode stats #121

Merged

Conversation

daichimukai
Copy link
Contributor

@daichimukai daichimukai commented Jun 16, 2022

The pvc-autoresizer decides whether each volume needs to be resized based on volume stats. This stats consists of available bytes, capacity, free inode count and all inode counts. The controller gets these values from prometheus metrics.

Without this patch, if metrics lack inodes counts for some target volumes, decision on resize necessity are done as if the lacking values are zero. This causes unnecessary resize for such volumes, and may continues to resize up to volume storage limit.

This patch changes reconciler to resize volume only if controller succeeded to get all four volume stats.

Fixes: #118


Edit: I also updated TopoLVM version to reduce CI flakiness.

@daichimukai daichimukai force-pushed the controller/dont-resize-if-failed-to-get-some-metrics branch from 3eda503 to fc7717b Compare June 16, 2022 12:23
@daichimukai daichimukai force-pushed the controller/dont-resize-if-failed-to-get-some-metrics branch from fc7717b to 6c37b0a Compare June 17, 2022 10:04
The pvc-autoresizer decides whether each volume needs to be resized
based on volume stats. This stats consist of available bytes, capacity,
free inode count and all inode counts. The controller gets these values
from prometheus metrics.

Without this patch, if metrics lack inodes counts for some target
volumes, decision on resize necessity are done as if the lacking values
are zero. This causes unnecessary resizes for such volumes, and may
continues to resize up to the volume storage limit.

This patch changes the reconciler to resize volumes only if the
controller succeeded to get all four volume stats.

Fixes: f7e1be3 ("Add inode checking feature")
@daichimukai daichimukai force-pushed the controller/dont-resize-if-failed-to-get-some-metrics branch 3 times, most recently from 734c8dd to 4d33163 Compare June 22, 2022 04:49
The e2e test depends on topolvm's example which had flakiness due to
insufficient wait for webhook readiness. This is addressed in topolvm
commit 31f8d5329c7e ("example: wait for topolvm controller mutating
webhook to become ready"). Use this commit if possible to reduce CI
flakiness.
@daichimukai daichimukai force-pushed the controller/dont-resize-if-failed-to-get-some-metrics branch from 4d33163 to 35410dd Compare June 22, 2022 04:50
@daichimukai daichimukai requested review from a team, toshipp and satoru-takeuchi and removed request for a team June 22, 2022 05:06
@daichimukai daichimukai marked this pull request as ready for review June 22, 2022 05:06
@daichimukai daichimukai requested a review from a team as a code owner June 22, 2022 05:06
@satoru-takeuchi satoru-takeuchi merged commit 2cb7577 into main Jun 24, 2022
@satoru-takeuchi satoru-takeuchi deleted the controller/dont-resize-if-failed-to-get-some-metrics branch June 24, 2022 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
3 participants