OADP-7665: Pass --log-level to NodeAgent DaemonSet container args - #2139
OADP-7665: Pass --log-level to NodeAgent DaemonSet container args#2139kaovilai wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughNodeAgent reconciliation now handles Pod metadata, normalized resource values, storage-class affinity, DaemonSet metadata, missing DaemonSets, and argument precedence. Tests cover these behaviors and verify that ConfigMap generation does not mutate the DPA specification. ChangesNodeAgent configuration and reconciliation
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This localized change passes the stated unit test and adds the configured log level to NodeAgent arguments; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
Full details: Description checkExplanation The description explains why the change was made and provides a test plan with a targeted unit test and command. It also identifies the pending E2E validations. The headings differ from the repository template, and no pictures are included, but the required information is mostly present. Full details: Stable And Deterministic Test NamesExplanation PASS. The pull request adds one table-test name: "valid DPA CR with LogLevel set to debug, NodeAgent DaemonSet is built with LogLevel set to debug". This is a fixed descriptive string. It contains no generated value, timestamp, node name, namespace, IP address, or runtime interpolation. The Ginkgo Describe and Entry titles were not changed. Full details: Test Structure And QualityExplanation PASS: The pull request adds a case to an existing Go table test, not a new Ginkgo Full details: Microshift Test CompatibilityExplanation PASS: The pull request adds a standard Go table-test case to Full details: Single Node Openshift (Sno) Test CompatibilityExplanation PASS: The pull request changes only Full details: Topology-Aware Scheduling CompatibilityExplanation PASS: The pull request changes only NodeAgent container arguments and adds a matching unit-test case. The controller diff adds Full details: Ote Binary Stdout ContractExplanation PASS: The pull request changes only Full details: Ipv6 And Disconnected Network Test CompatibilityExplanation PASS. The pull request changes only Full details: No-Weak-CryptoExplanation PASS: The pull request adds only Full details: Container-PrivilegesExplanation PASS: The PR changes only NodeAgent argument handling and test setup for Full details: No-Sensitive-Data-In-LogsExplanation The pull-request diff adds only
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
|
@kaovilai isn't there a jira on this ??? |
There was a problem hiding this comment.
Pull request overview
This PR propagates spec.configuration.velero.logLevel from the DataProtectionApplication (DPA) CR into the NodeAgent DaemonSet container args, aligning node-agent logging behavior with the Velero server deployment.
Changes:
- Append
--log-level=<value>to the node-agent container args whendpa.Spec.Configuration.Velero.LogLevelis set. - Extend node-agent daemonset unit test scaffolding to support asserting log-level.
- Add a unit test case validating
LogLevel=debugresults in--log-level=debugon the NodeAgent DaemonSet.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/controller/nodeagent.go | Passes DPA Velero logLevel into the node-agent DaemonSet container args. |
| internal/controller/nodeagent_test.go | Adds test builder support and a unit test case asserting node-agent receives --log-level. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if dpa.Spec.Configuration.Velero.LogLevel != "" { | ||
| nodeAgentContainer.Args = append(nodeAgentContainer.Args, fmt.Sprintf("--log-level=%s", dpa.Spec.Configuration.Velero.LogLevel)) | ||
| } |
There was a problem hiding this comment.
PR description references getInheritedPodInfo in pkg/exposer/image.go, but there is no pkg/exposer package (and no getInheritedPodInfo symbol) in this repository. Please update the PR description to point at the correct code path in this repo that consumes the node-agent --log-level arg, or clarify that it’s referring to an external component/repo.
|
no jira yet.. thread |
|
/retest |
nodeagent will error out if that happens. Our CRD also have these markers to block invalid values. oadp-operator/api/v1alpha1/dataprotectionapplication_types.go Lines 322 to 323 in 3cceb1e |
Merge conflict in internal/controller/nodeagent_test.go
Automatic merge failed; fix conflicts and then commit the result. |
|
/retest |
|
@kaovilai: This pull request references OADP-7665 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/cherry-pick oadp-1.6 |
|
@weshayutin: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/retest |
|
sounds like rebase needed.. |
61e70f4 to
6449f95
Compare
|
/retest |
|
/override ci/prow/4.23-e2e-test-aws |
|
@kaovilai: Overrode contexts on behalf of kaovilai: ci/prow/4.23-e2e-test-aws DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
The DPA LogLevel field was only passed to the Velero server deployment but not to the NodeAgent DaemonSet. This meant data mover pods spawned by the exposer could not inherit the log level from the node-agent, since the exposer reads --log-level from the node-agent container args. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering> Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
6449f95 to
ec10bbf
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kaovilai, sseago, weshayutin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@kaovilai: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
--log-levelfromdpa.Spec.Configuration.Velero.LogLevelto NodeAgent DaemonSet container argsgetInheritedPodInfoinpkg/exposer/image.go)Request: https://redhat-internal.slack.com/archives/C0144ECKUJ0/p1772820634393599
Test plan
go test ./internal/controller/ -run TestDPAReconciler_buildNodeAgentDaemonsetpasseslogLevel: debugin DPA and verify node-agent pod has--log-level=debugin args🤖 Generated with Claude Code
via Happy
Summary by CodeRabbit