Open RishabhSaini opened 2 months ago
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: RishabhSaini Once this PR has been reviewed and has the lgtm label, please assign djoshy for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
@RishabhSaini: This pull request references Jira Issue OCPBUGS-9178, which is invalid:
Comment /jira refresh
to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.
The bug has been updated to refer to the pull request using the external bug tracker.
Thanks! @cheesesashimi for the detailed review.
Question: validateOnDiskStateForEvent
currently only handles Ignition Spec 3 Configs. Are we still continuing to support Spec 2 Configs?
/retest-required
Thanks! @cheesesashimi for the detailed review.
Question:
validateOnDiskStateForEvent
currently only handles Ignition Spec 3 Configs. Are we still continuing to support Spec 2 Configs?
To my knowledge, I think we currently support both: https://github.com/openshift/machine-config-operator/blob/master/docs/MachineConfigDaemon.md and we have a function: convertIgnition22to34 to convert between V2 and V3 ignition config. There are more conversion tools in /pkg/controller/common/helpers.go. Please correct me if I am wrong :)
/retest-required
/retest-required
/retest-required
@cheesesashimi I am unsure whether the checks failing are due to my PR or flaky CI. Although it doesn't seem like most of them are failing due to the changes I made
/retest-required
/retest-required
/retest-required
/retest-required
/retest
@RishabhSaini: all tests passed!
Full PR test history. Your PR dashboard.
Fixes: OCPBUGS-9178
- What I did
The Config Drift Monitor currently runs
validateOnDiskState
every time there’s a change in any tracked file. This triggers a check of all files and units for possible drift, even if only one file changed. Hence this change, efficiently only checks the specific file or path for config drift where the change happened usingvalidateOnDiskStateForEvent
. Only when the Config Drift Monitor detects a disk state mismatch due to the event that occurred, an update is scheduled and then the completevalidateOnDiskState
is run. This reduces the overhead every loop of the config drift monitor.The SSH authorized paths have also been added.
- How to verify it
Any file event logged by fsnotify only triggers a check to the corresponding MC field
Verify SSH file content drifts by the test cases
go test -v ./pkg/daemon/ -run ConfigDriftMonitor/ssh_file_content_drift
go test -v ./pkg/daemon/ -run ConfigDriftMonitor/ssh_file_touch
- Description for the changelog