Don't create NodePasswordValidationFailed event if agent is disabled#9312
Conversation
There was a problem hiding this comment.
Thanks for the contribution!
I don't think this is the correct place to do this. I think we only want to disable node password validation for the local node, so we should just return early from verifyLocalPassword before the deferred validation is enqueued, if the agent is disabled:
Lines 516 to 520 in 6d77b7a
We don't want to disable ALL node password validation just because the server doesn't have a local agent. There may still be agents, and we do want to validate their passwords.
e9eaaee to
4a3eeb0
Compare
|
@brandond Thank you for the quick review! Good points! I hope this iteration addresses the comments in a acceptable way. |
Signed-off-by: Oleg Matskiv <oleg.matskiv@gmail.com>
4a3eeb0 to
5e7b8a4
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #9312 +/- ##
==========================================
+ Coverage 40.56% 41.05% +0.48%
==========================================
Files 154 154
Lines 16555 16626 +71
==========================================
+ Hits 6716 6825 +109
+ Misses 8692 8646 -46
- Partials 1147 1155 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Proposed Changes
When the agent is disabled, e.g. when k3s image is used in a vcluster, a "NodePasswordValidationFailed" Event is created on every restart. This results in users questioning the state of their cluster, even though there is no impact on functionality.
The proposed change would create a debug log instead of a user-facing event.
Types of Changes
enhancment/bug fix?
Verification
Testing
Linked Issues
User-Facing Change
Further Comments
I am open to discussion and suggestion on better implementation.