Skip to content

Conversation

@plkokanov
Copy link
Contributor

After #1373, which changed the log severity from Error to Info of the log describing that a PVC cannot be decreased, because it already has a larger size than what is currently configured, the following error can be observed, because the Info() call did not contain an even number of key-value pairs after the main log message:

{"level":"info","ts":"2025-11-25T12:00:46Z","logger":"controller.VLSingle","msg":"cannot decrease PVC=vlsingle-example size from=30Gi to=40Gi","vlsingle":"example","namespace":"default"}
{"level":"dpanic","ts":"2025-11-25T12:01:47Z","logger":"controller.VLSingle","msg":"odd number of arguments passed as key-value pairs for logging","vlsingle":"example","namespace":"default","ignored key":"cannot decrease PVC size, please check VolumeClaimTemplate configuration"}

This PR moves the extra string "please check VolumeClaimTemplate configuration" to the fmt.Srpintf(...) call and removes the unnecessary cannot decrease PVC size text as it would just be duplicated.

@plkokanov plkokanov force-pushed the fix/odd-number-key-value-pairs branch from 61e5767 to 05812ea Compare November 25, 2025 14:22
Copy link
Contributor

@AndrewChubatiuk AndrewChubatiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! could you please also add a changelog entry for this fix?

@plkokanov plkokanov changed the title Fix odd number of key-value pairs in info log about pvc size increase Fix odd number of key-value pairs in info log about pvc size difference Nov 25, 2025
@plkokanov
Copy link
Contributor Author

Added the changelog entry. Hopefully, it's the right place and format (this is my first PR here 😊 )

@plkokanov plkokanov force-pushed the fix/odd-number-key-value-pairs branch from 4c214fa to 35771ff Compare November 26, 2025 07:53
@AndrewChubatiuk AndrewChubatiuk merged commit fdfe784 into VictoriaMetrics:master Nov 26, 2025
2 checks passed
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.

3 participants