Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add D-Bus API (and possibly CLI) for better staging and finalizing #1748

Closed
jlebon opened this issue Jan 30, 2019 · 2 comments
Closed

Add D-Bus API (and possibly CLI) for better staging and finalizing #1748

jlebon opened this issue Jan 30, 2019 · 2 comments
Labels
jira for syncing to jira

Comments

@jlebon
Copy link
Member

jlebon commented Jan 30, 2019

In scenarios where rpm-ostree is driven by a separate app (see #1747), we need to provide more control over how updates are applied. This RFE is about being able to separate staging a deployment from rebooting into it by default (see FCOS discussions for details). IOW, we want at least two API enhancements:

  1. a way to stage deployments while still not making it the default (@cgwalters' strawman is a file that ostree-finalize-staged.service becomes conditional on).
  2. a way to make it the default and reboot (e.g. removing the file and calling systemctl reboot).
@jlebon
Copy link
Member Author

jlebon commented Jan 30, 2019

(Note whether we actually use this in FCOS is still being discussed in the ticket above, though such an API on its own seems useful enough).

@cgwalters
Copy link
Member

Strawman: add e.g. reboot --update into systemd; it would end up calling out to e.g. /usr/lib/systemd/reboot-update which would be a symlink to /usr/bin/rpm-ostree and we'd look at argv0 to handle it.

@jlebon jlebon added the jira for syncing to jira label Apr 3, 2019
jlebon added a commit to jlebon/ostree that referenced this issue Apr 16, 2019
Teach `ostree-finalize-staged.service` to check for a file in `/run` to
determine if it should do the finalization. This will be used in
RPM-OSTree, where we want to be able to separate out "preparing updates"
from "making update the default" for more fine-grained control. See:
coreos/rpm-ostree#1748
jlebon added a commit to jlebon/ostree that referenced this issue Apr 16, 2019
Teach `ostree-finalize-staged.service` to check for a file in `/run` to
determine if it should do the finalization. This will be used in
RPM-OSTree, where we want to be able to separate out "preparing updates"
from "making update the default" for more fine-grained control. See:
coreos/rpm-ostree#1748
jlebon added a commit to jlebon/ostree that referenced this issue Apr 16, 2019
Teach `ostree-finalize-staged.service` to check for a file in `/run` to
determine if it should do the finalization. This will be used in
RPM-OSTree, where we want to be able to separate out "preparing updates"
from "making update the default" for more fine-grained control. See:
coreos/rpm-ostree#1748
jlebon added a commit to jlebon/ostree that referenced this issue Apr 16, 2019
Teach `ostree-finalize-staged.service` to check for a file in `/run` to
determine if it should do the finalization. This will be used in
RPM-OSTree, where we want to be able to separate out "preparing updates"
from "making update the default" for more fine-grained control. See:
coreos/rpm-ostree#1748
jlebon added a commit to jlebon/ostree that referenced this issue Apr 17, 2019
Teach `ostree-finalize-staged.service` to check for a file in `/run` to
determine if it should do the finalization. This will be used in
RPM-OSTree, where we want to be able to separate out "preparing updates"
from "making update the default" for more fine-grained control. See:
coreos/rpm-ostree#1748
jlebon added a commit to jlebon/rpm-ostree that referenced this issue Apr 18, 2019
Still need to test this properly, but essentially, we teach
`UpdateDeployment` to make use of libostree's staging lock and then add
a `FinalizeDeployment` API to perform the final unlock & reboot.

Closes: coreos#1748
jlebon added a commit to jlebon/rpm-ostree that referenced this issue Apr 18, 2019
Still need to test this properly, but essentially, we teach
`UpdateDeployment` to make use of libostree's staging lock and then add
a `FinalizeDeployment` API to perform the final unlock & reboot.

Closes: coreos#1748
jlebon added a commit to jlebon/rpm-ostree that referenced this issue Apr 18, 2019
Still need to test this properly, but essentially, we teach
`UpdateDeployment` to make use of libostree's staging lock and then add
a `FinalizeDeployment` API to perform the final unlock & reboot.

Closes: coreos#1748
jlebon added a commit to jlebon/rpm-ostree that referenced this issue Apr 24, 2019
Teach `UpdateDeployment` to make use of libostree's staging lock and
then add a `FinalizeDeployment` API to perform the final unlock &
reboot.

I also added a hidden CLI to make testing this easier, but also because
it's likely the FCOS-agent-yet-to-be-named will just end up using the
CLI to keep it simple.

Closes: coreos#1748
jlebon added a commit to jlebon/ostree that referenced this issue Apr 24, 2019
Teach `ostree-finalize-staged.service` to check for a file in `/run` to
determine if it should do the finalization. This will be used in
RPM-OSTree, where we want to be able to separate out "preparing updates"
from "making update the default" for more fine-grained control. See:
coreos/rpm-ostree#1748
jlebon added a commit to jlebon/rpm-ostree that referenced this issue Apr 24, 2019
Teach `UpdateDeployment` to make use of libostree's staging lock and
then add a `FinalizeDeployment` API to perform the final unlock &
reboot.

I also added a hidden CLI to make testing this easier, but also because
it's likely the FCOS-agent-yet-to-be-named will just end up using the
CLI to keep it simple.

Closes: coreos#1748
rh-atomic-bot pushed a commit to ostreedev/ostree that referenced this issue Apr 24, 2019
Teach `ostree-finalize-staged.service` to check for a file in `/run` to
determine if it should do the finalization. This will be used in
RPM-OSTree, where we want to be able to separate out "preparing updates"
from "making update the default" for more fine-grained control. See:
coreos/rpm-ostree#1748

Closes: #1841
Approved by: cgwalters
jlebon added a commit to jlebon/rpm-ostree that referenced this issue Apr 26, 2019
Teach `UpdateDeployment` to make use of libostree's staging lock and
then add a `FinalizeDeployment` API to perform the final unlock &
reboot.

I also added a hidden CLI to make testing this easier, but also because
it's likely the FCOS-agent-yet-to-be-named will just end up using the
CLI to keep it simple.

Closes: coreos#1748
jlebon added a commit to jlebon/rpm-ostree that referenced this issue Apr 29, 2019
Teach `UpdateDeployment` to make use of libostree's staging lock and
then add a `FinalizeDeployment` API to perform the final unlock &
reboot.

I also added a hidden CLI to make testing this easier, but also because
it's likely the FCOS-agent-yet-to-be-named will just end up using the
CLI to keep it simple.

Closes: coreos#1748
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira for syncing to jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants