Skip to content

Conversation

yuqi-zhang
Copy link
Contributor

Change unit enable/disable to write a mco systemd preset file, so
that we can properly handle units not targetting multi-user.target.wants.
The code is essentially copied from Ignition/units and emulates
Ignition behaviour for this.

Change unit enable/disable to write a mco systemd preset file, so
that we can properly handle units not targetting multi-user.target.wants.
The code is essentially copied from Ignition/units and emulates
Ignition behaviour for this.

Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. labels Oct 7, 2020
@openshift-ci-robot
Copy link
Contributor

@yuqi-zhang: This pull request references Bugzilla bug 1885365, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

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

In response to this:

WIP: Bug 1885365: update.go: use systemd presets to enable/disable units

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Oct 7, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuqi-zhang

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

The pull request process is described here

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 7, 2020
@openshift-ci-robot
Copy link
Contributor

@yuqi-zhang: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/unit 248d6d3 link /test unit
ci/prow/okd-images 248d6d3 link /test okd-images
ci/prow/okd-e2e-aws 248d6d3 link /test okd-e2e-aws
ci/prow/images 248d6d3 link /test images
ci/prow/e2e-aws-workers-rhel7 248d6d3 link /test e2e-aws-workers-rhel7
ci/prow/e2e-aws 248d6d3 link /test e2e-aws
ci/prow/e2e-ovn-step-registry 248d6d3 link /test e2e-ovn-step-registry
ci/prow/e2e-metal-ipi 248d6d3 link /test e2e-metal-ipi
ci/prow/e2e-gcp-op 248d6d3 link /test e2e-gcp-op
ci/prow/e2e-upgrade 248d6d3 link /test e2e-upgrade

Full PR test history. Your PR dashboard.

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

@yuqi-zhang
Copy link
Contributor Author

I think I should perhaps just shell out directly to systemctl enable/disable, Benjamin noted that presets are really just used for defaults on firstboot.

@bgilbert
Copy link
Contributor

bgilbert commented Oct 7, 2020

The officially recommended approach for programmatic enable/disable operations at runtime is to use the systemd D-Bus API, but I don't know if that's feasible here.

@cgwalters
Copy link
Member

I think I should perhaps just shell out directly to systemctl enable/disable, Benjamin noted that presets are really just used for defaults on firstboot.

Yeah, I think so. It'd be a lot simpler of a patch too.

@yuqi-zhang
Copy link
Contributor Author

closing in favour of #2145

@yuqi-zhang yuqi-zhang closed this Oct 7, 2020
@openshift-ci-robot
Copy link
Contributor

@yuqi-zhang: This pull request references Bugzilla bug 1885365. The bug has been updated to no longer refer to the pull request using the external bug tracker.

In response to this:

WIP: Bug 1885365: update.go: use systemd presets to enable/disable units

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/test-infra repository.

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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants