Skip to content

Conversation

@pablintino
Copy link
Contributor

- What I did

Replace direct systemctl exec calls with a systemd abstraction layer that uses the coreos/go-systemd library. The new SystemdManager factory pattern improves performance, maintainability, and testing by introducing easily mockable interfaces and enabling connection reuse.

- How to verify it

TBD

- Description for the changelog

Migrated systemd interactions from systemctl subprocesses to native DBus calls.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 21, 2026
@openshift-ci-robot
Copy link
Contributor

@pablintino: This pull request explicitly references no jira issue.

Details

In response to this:

- What I did

Replace direct systemctl exec calls with a systemd abstraction layer that uses the coreos/go-systemd library. The new SystemdManager factory pattern improves performance, maintainability, and testing by introducing easily mockable interfaces and enabling connection reuse.

- How to verify it

TBD

- Description for the changelog

Migrated systemd interactions from systemctl subprocesses to native DBus calls.

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.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 21, 2026
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 21, 2026
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 21, 2026
@pablintino pablintino force-pushed the dbus branch 2 times, most recently from d7e3c2a to 5fda73b Compare January 22, 2026 09:11
@pablintino
Copy link
Contributor Author

/test e2e-gcp-op-2of2

@pablintino pablintino force-pushed the dbus branch 2 times, most recently from b8dcacc to cfb5469 Compare January 26, 2026 10:07
@pablintino
Copy link
Contributor Author

pablintino commented Jan 26, 2026

/retitle MCO-2065

@openshift-ci openshift-ci bot changed the title NO-ISSUE: Move systemctl execs to dbus calls MCO-2065 Jan 26, 2026
@pablintino
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot removed the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 26, 2026
@openshift-ci-robot
Copy link
Contributor

@pablintino: No Jira issue is referenced in the title of this pull request.
To reference a jira issue, add 'XYZ-NNN:' to the title of this pull request and request another refresh with /jira refresh.

Details

In response to this:

/jira refresh

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.

@pablintino
Copy link
Contributor Author

pablintino commented Jan 27, 2026

/retitle MCO-2065: Move systemctl execs to dbus calls

@openshift-ci openshift-ci bot changed the title MCO-2065 MCO-2065: Move systemctl execs to dbus calls Jan 27, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 27, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 27, 2026

@pablintino: This pull request references MCO-2065 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

- What I did

Replace direct systemctl exec calls with a systemd abstraction layer that uses the coreos/go-systemd library. The new SystemdManager factory pattern improves performance, maintainability, and testing by introducing easily mockable interfaces and enabling connection reuse.

- How to verify it

TBD

- Description for the changelog

Migrated systemd interactions from systemctl subprocesses to native DBus calls.

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.

@pablintino
Copy link
Contributor Author

/test verify

Replace direct systemctl exec calls with a systemd abstraction layer that
uses the coreos/go-systemd library. The new SystemdManager factory pattern
improves performance, maintainability, and testing by introducing easily
mockable interfaces and enabling connection reuse.

There are two ways of using the new interfaces:
- DoConnection() for single operations with automatic cleanup
- NewConnection() for batching multiple operations on one connection

Signed-off-by: Pablo Rodriguez Nava <[email protected]>
@pablintino
Copy link
Contributor Author

/retest-required

1 similar comment
@pablintino
Copy link
Contributor Author

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 29, 2026

@pablintino: 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.

Comment on lines +22 to +30
// NormalizeSystemdUnitNames ensures unit names have valid systemd suffixes.
// D-Bus requires the full unit name (e.g., "crio.service") while systemctl
// accepts short names (e.g., "crio"). This function adds ".service" if no
// recognized suffix is present.
//
// Valid systemd unit suffixes are:
//
// .service, .socket, .device, .mount, .automount, .swap,
// .target, .path, .timer, .slice, .scope
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding this comment. I was curious about the change in the CRIOServiceName constant.

Copy link
Member

@isabella-janssen isabella-janssen left a comment

Choose a reason for hiding this comment

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

/lgtm

Changes look fair to me & tests are passing.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: isabella-janssen, pablintino

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [isabella-janssen,pablintino]

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

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants