Skip to content

ETCD-319: adding transient systemd unit for etcd#976

Merged
openshift-merge-robot merged 1 commit intoopenshift:mainfrom
dusk125:systemd-etcd
Feb 8, 2023
Merged

ETCD-319: adding transient systemd unit for etcd#976
openshift-merge-robot merged 1 commit intoopenshift:mainfrom
dusk125:systemd-etcd

Conversation

@dusk125
Copy link
Contributor

@dusk125 dusk125 commented Sep 23, 2022

This is the first step to get etcd running un-bundled from MicroShift; this change makes etcd run in a transient systemd unit whose lifetime is bound to the MicroShift execution. Also, as a temporary measure, I added a subcommand to MicroShift that just runs the bundled etcd; this is so we can test etcd's execution with the systemd unit and this will be removed and replaced by an invocation of the etcd binary that will be laid down by an rpm.

The end goal, as described in this Microshift Enhancement is to remove the current embedded etcd service and replace it with a service that launches etcd in a transient systemd unit.

@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 Sep 23, 2022
@openshift-ci openshift-ci bot requested review from dhellmann and oglok September 23, 2022 16:33
@dusk125 dusk125 changed the title WIP: adding transient systemd unit for etcd WIP: ETCD-319: adding transient systemd unit for etcd Sep 23, 2022
@dusk125
Copy link
Contributor Author

dusk125 commented Sep 23, 2022

@haircommander Would you mind taking a look at this; mainly that this will be able to do what I've outlined above please?

@haircommander
Copy link
Member

added a review comment on the proposal, this doesn't seem like the right direction to me (though I certainly have missed many conversations)

@dusk125
Copy link
Contributor Author

dusk125 commented Oct 4, 2022

The most recent update adds @deads2k suggestion to have the transient systemd unit launch the currently bundled etcd so that we can start testing the systemd launching mechanism while we work to get the rpm with etcd laid down. Once we have etcd installing from an rpm, I'll update this to completely remove bundled etcd and edit the systemd-run command to launch the rpm etcd.

@dusk125 dusk125 force-pushed the systemd-etcd branch 4 times, most recently from d23633b to 558f4a1 Compare October 5, 2022 20:51
@deads2k
Copy link
Contributor

deads2k commented Oct 6, 2022

this lgtm

Is there a specific reason it's a WIP?

@dusk125 dusk125 changed the title WIP: ETCD-319: adding transient systemd unit for etcd ETCD-319: adding transient systemd unit for etcd Oct 6, 2022
@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 Oct 6, 2022
@deads2k
Copy link
Contributor

deads2k commented Oct 6, 2022

This PR as it stands

  1. starts the transient systemd unit
  2. ties the systemd unit to the lifecycle of microshift.service so termination of microshift graceful and non-graceful (kill -9) also terminates etcd
  3. does not bring in a new RPM dependency (yet). that is desired in the near future, but this gives the proper systemd lifecycle and process separation to reduce the risk on introducing the new RPM
  4. passes the existing configuration arguments to the separate etcd process

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 6, 2022
@dhellmann
Copy link
Contributor

/hold

The team needs to deliver a build to the customer in the next week. Let's wait to bring this change in until at least that is completed.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 6, 2022
@dusk125 dusk125 force-pushed the systemd-etcd branch 2 times, most recently from 52b65ea to cb04782 Compare January 27, 2023 14:56
@dusk125 dusk125 force-pushed the systemd-etcd branch 3 times, most recently from 92b11c0 to 5006f1b Compare February 1, 2023 18:37
@dusk125 dusk125 force-pushed the systemd-etcd branch 2 times, most recently from b5acc97 to fc70c11 Compare February 6, 2023 15:52
@dusk125
Copy link
Contributor Author

dusk125 commented Feb 6, 2023

/retest

@pmtk
Copy link
Member

pmtk commented Feb 6, 2023

/test e2e-openshift-conformance-sig-api-machinery

@pmtk
Copy link
Member

pmtk commented Feb 6, 2023

This looks good to me, I'd like others to take a look
@dhellmann @pacevedom @copejon

Copy link
Contributor

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

We've been trying to improve the git log messages with new changes. You could consider adding some of the detail from the PR message to the commit message.

I had a couple of questions inline, but nothing I think should block this.

/hold cancel
/approve

I'll leave final approval for @pmtk.

Copy link
Contributor

Choose a reason for hiding this comment

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

The main thing we wanted was to always use the microshift-etcd binary in the same directory as the microshift binary, to support the developer use case. Does it matter if that developer binary is run in a systemd unit? Would always using system simplify anything below?

Copy link
Member

Choose a reason for hiding this comment

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

That's a good idea. Only thing is that etcd logs would be separate, but I don't think we need them that much in day to day development

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this is another area to simplify after the initial version is merged?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IIRC, there was some pushback in a previous meeting about not executing etcd as a systemd unit in development, I don't remember the reason given.

Copy link
Contributor

Choose a reason for hiding this comment

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

I may have been worried that it wouldn't work, or wouldn't stop, or something. I don't have a preference, as long as it works. We can land it this way and experiment with removing it when we have some time.

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 7, 2023
@pmtk
Copy link
Member

pmtk commented Feb 8, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 8, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, dhellmann, dusk125, pmtk

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:

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
Copy link

/retest-required

Remaining retests: 0 against base HEAD 61e5389 and 2 for PR HEAD 3e6917b in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 8, 2023

@dusk125: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/periodic-ocp-4.13-images 4c4f1f59026f99124b96176ed25027b83bedbf03 link true /test periodic-ocp-4.13-images

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

@dusk125
Copy link
Contributor Author

dusk125 commented Feb 8, 2023

/reset-required

@dusk125
Copy link
Contributor Author

dusk125 commented Feb 8, 2023

/retest-required

@openshift-merge-robot openshift-merge-robot merged commit 9b5ab0e into openshift:main Feb 8, 2023
@dusk125 dusk125 deleted the systemd-etcd branch February 8, 2023 18:51
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants