Skip to content

OCPBUGS-83865: Revert stalld backend to sched_debug#1515

Open
bartwensley wants to merge 1 commit into
openshift:mainfrom
bartwensley:stalld-backend
Open

OCPBUGS-83865: Revert stalld backend to sched_debug#1515
bartwensley wants to merge 1 commit into
openshift:mainfrom
bartwensley:stalld-backend

Conversation

@bartwensley
Copy link
Copy Markdown
Contributor

@bartwensley bartwensley commented May 13, 2026

Updating the MC to revert the stalld backend to sched_debug. This is necessary because the new default queue_task backend causes an unacceptable latency penalty (see RHEL-175242).

Summary by CodeRabbit

  • New Features

    • The stalld daemon is now automatically configured to use the sched_debug backend during system initialization to support performance profiles.
  • Tests

    • Added tests to validate that the stalld backend configuration is generated and included in rendered system configuration.

@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels May 13, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented May 13, 2026

@bartwensley: This pull request references Jira Issue OCPBUGS-83865, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @dgonyier

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Updating the MC to revert the stalld backend to sched_debug. This is necessary because the new default queue_task backend causes an unacceptable latency penalty (see RHEL-175242).

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 460527a8-2ee4-4b28-8448-bc85a8d2cb5e

📥 Commits

Reviewing files that changed from the base of the PR and between ad02c11 and 4f402e3.

📒 Files selected for processing (12)
  • pkg/performanceprofile/controller/performanceprofile/components/machineconfig/machineconfig.go
  • pkg/performanceprofile/controller/performanceprofile/components/machineconfig/machineconfig_test.go
  • test/e2e/performanceprofile/testdata/render-expected-output/bootstrap/extra-mcp/openshift-bootstrap-master_machineconfig.yaml
  • test/e2e/performanceprofile/testdata/render-expected-output/bootstrap/extra-mcp/openshift-bootstrap-worker_machineconfig.yaml
  • test/e2e/performanceprofile/testdata/render-expected-output/bootstrap/no-mcp/openshift-bootstrap-master_machineconfig.yaml
  • test/e2e/performanceprofile/testdata/render-expected-output/bootstrap/no-mcp/openshift-bootstrap-worker_machineconfig.yaml
  • test/e2e/performanceprofile/testdata/render-expected-output/default/arm/manual_machineconfig.yaml
  • test/e2e/performanceprofile/testdata/render-expected-output/default/cpuFrequency/manual_machineconfig.yaml
  • test/e2e/performanceprofile/testdata/render-expected-output/default/manual_machineconfig.yaml
  • test/e2e/performanceprofile/testdata/render-expected-output/default/pp-norps/manual_machineconfig.yaml
  • test/e2e/performanceprofile/testdata/render-expected-output/manual_machineconfig.yaml
  • test/e2e/performanceprofile/testdata/render-expected-output/no-ref/manual_machineconfig.yaml
✅ Files skipped from review due to trivial changes (1)
  • test/e2e/performanceprofile/testdata/render-expected-output/default/pp-norps/manual_machineconfig.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/performanceprofile/controller/performanceprofile/components/machineconfig/machineconfig_test.go
  • pkg/performanceprofile/controller/performanceprofile/components/machineconfig/machineconfig.go

Walkthrough

The machineconfig component now unconditionally writes two files into generated Ignition MachineConfigs: /etc/sysconfig/stalld-backend setting BE="-b sched_debug", and a systemd drop-in /etc/systemd/system/stalld.service.d/stalld-backend.conf that loads that EnvironmentFile. A unit test verifies both files are present and contain the expected contents.

Changes

Stalld sched_debug Backend Configuration

Layer / File(s) Summary
Stalld backend sysconfig and systemd drop-in
pkg/performanceprofile/controller/performanceprofile/components/machineconfig/machineconfig.go
getIgnitionConfig now adds two storage files to Ignition: /etc/sysconfig/stalld-backend with BE="-b sched_debug" and /etc/systemd/system/stalld.service.d/stalld-backend.conf containing EnvironmentFile=/etc/sysconfig/stalld-backend, both created with mode 0644 via addContent.
Unit test: verify generated Ignition files
pkg/performanceprofile/controller/performanceprofile/components/machineconfig/machineconfig_test.go
New Ginkgo Context("stalld backend configuration") unmarshals the generated Ignition config, base64-decodes storage file contents, and asserts the presence and exact contents of the sysconfig and systemd drop-in files.
Rendered MachineConfig fixtures updated
test/e2e/performanceprofile/testdata/render-expected-output/**/manual_machineconfig.yaml, .../bootstrap/**_machineconfig.yaml, .../default/**/manual_machineconfig.yaml, .../no-ref/manual_machineconfig.yaml
Updated expected output fixtures to include the two new spec.config.storage.files entries (sysconfig and systemd drop-in) with base64-encoded contents and appropriate file metadata in multiple test variants.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 10 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ⚠️ Warning All 5 Expect calls lack assertion messages. Codebase pattern shows tests should include meaningful failure messages, as seen in lines 114 and 167 of the same file. Add assertion messages to all Expect calls (lines 266, 269, 275, 279, 280) to help diagnose failures when assertions fail.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: reverting stalld backend configuration to sched_debug, which aligns with all the code and test data changes across multiple machine config files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All test names in the PR are stable and deterministic. The new stalld test uses static descriptive names with no dynamic content, timestamps, UUIDs, or other changing values.
Microshift Test Compatibility ✅ Passed No new e2e tests added. The test added in machineconfig_test.go is a unit test in pkg/, not an e2e test in test/e2e/. The custom check applies only to e2e tests.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No e2e tests were added in this PR. The new Ginkgo test is a unit test in pkg/ (not test/e2e/). The SNO compatibility check applies only to e2e tests.
Topology-Aware Scheduling Compatibility ✅ Passed No pod scheduling constraints introduced. Changes are node-level system config via MachineConfig/Ignition, topology-agnostic across SNO, TNF, TNA, HyperShift.
Ote Binary Stdout Contract ✅ Passed No OTE Binary Stdout Contract violations. Main code only adds Ignition config content. Test changes are within Ginkgo test blocks where output is intercepted. No process-level code writes to stdout.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed New Ginkgo test is a unit test (not e2e) with no IPv4 assumptions or external connectivity requirements. Test only validates Ignition config generation with base64 decoding.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: go: inconsistent vendoring in :\n\tgithub.com/RHsyseng/operator-utils@v1.4.13: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/coreos/go-systemd@v0.0.0-20191104093116-d3cd4ed1dbcf: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/coreos/ignition@v0.35.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/coreos/ignition/v2@v2.26.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/docker/go-units@v0.5.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/go-logr/stdr@v1.2.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/google/go-cmp@v0.7.0

... [truncated 19340 characters] ...

is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/legacy-cloud-providers: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/metrics: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/mount-utils: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/pod-security-admission: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/sample-apiserver: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tgithub.com/onsi/ginkgo/v2: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\n\tTo ignore the vendor directory, use -mod=readonly or -mod=mod.\n\tTo sync the vendor directory, run:\n\t\tgo mod vendor\n"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: dgonyier.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

@bartwensley: This pull request references Jira Issue OCPBUGS-83865, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @dgonyier

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Updating the MC to revert the stalld backend to sched_debug. This is necessary because the new default queue_task backend causes an unacceptable latency penalty (see RHEL-175242).

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.

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.

@openshift-ci openshift-ci Bot requested review from ffromani and jmencak May 13, 2026 20:04
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bartwensley
Once this PR has been reviewed and has the lgtm label, please assign ffromani for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@bartwensley
Copy link
Copy Markdown
Contributor Author

/cc @MarSik

@openshift-ci openshift-ci Bot requested a review from MarSik May 13, 2026 20:08
@bartwensley bartwensley marked this pull request as draft May 13, 2026 20:22
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2026
@bartwensley
Copy link
Copy Markdown
Contributor Author

Looks like I need to update some e2e tests...

Updating the MC to revert the stalld backend to sched_debug. This
is necessary because the new default queue_task backend causes an
unacceptable latency penalty (see RHEL-175242).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Bart Wensley <bwensley@redhat.com>
@bartwensley bartwensley marked this pull request as ready for review May 13, 2026 22:19
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2026
@bartwensley
Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 14, 2026

@bartwensley: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@bartwensley
Copy link
Copy Markdown
Contributor Author

/cc @browsell

@openshift-ci openshift-ci Bot requested a review from browsell May 14, 2026 11:47
})

Context("stalld backend configuration", func() {
It("should include stalld sysconfig and systemd dropin files", func() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is checking the files, but not whether systemd consumed them. You should probably add an e2e test too that makes sure systemd noticed the files. See https://github.com/openshift/cluster-node-tuning-operator/blob/main/test/e2e/performanceprofile/functests/utils/systemd/systemd.go#L17 for helper functions. And probably place the test somewhere here https://github.com/openshift/cluster-node-tuning-operator/blob/main/test/e2e/performanceprofile/functests/1_performance/performance.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants