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

05core: add coreos-ignition-firstboot-complete.service #1087

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Jul 6, 2021

This is mostly a mechanical move of ignition-firstboot-complete.service
to this repo. The only differences are tweaking the service unit name
and the Description and Documentation keys.

Prompted by tweaks we'd like to do here, and possibly eventually moving
it to the initramfs fully (merging it with coreos-boot-edit.service).

The renaming also allows us to loosen the order of operation in which
this is done, so that we can get this in to enable the new unit, while
keeping the old unit disabled, without necessarily waiting for the
original unit file itself to drop out of the ignition package.

For background, see: coreos/ignition#1125

This is mostly a mechanical move of ignition-firstboot-complete.service
to this repo. The only differences are tweaking the service unit name
and the Description and Documentation keys.

Prompted by tweaks we'd like to do here, and possibly eventually moving
it to the initramfs fully (merging it with coreos-boot-edit.service).

The renaming also allows us to loosen the order of operation in which
this is done, so that we can get this in to enable the new unit, while
keeping the old unit disabled, without necessarily waiting for the
original unit file itself to drop out of the `ignition` package.

For background, see: coreos/ignition#1125
@jlebon
Copy link
Member Author

jlebon commented Jul 6, 2021

Ignition side of this at coreos/ignition#1245.

Tested successfully:

[root@cosa-devsh ~]# systemctl status coreos-ignition-firstboot-complete.service
● coreos-ignition-firstboot-complete.service - CoreOS Mark Ignition Boot Comple>
     Loaded: loaded (/usr/lib/systemd/system/coreos-ignition-firstboot-complete>
     Active: active (exited) since Tue 2021-07-06 19:05:31 UTC; 18s ago
       Docs: https://docs.fedoraproject.org/en-US/fedora-coreos/
    Process: 928 ExecStart=/bin/sh -c mount -o remount,rw /boot &&      if [[ $>
   Main PID: 928 (code=exited, status=0/SUCCESS)
        CPU: 31ms

Jul 06 19:05:30 localhost systemd[1]: Starting CoreOS Mark Ignition Boot Comple>
Jul 06 19:05:31 localhost systemd[1]: Finished CoreOS Mark Ignition Boot Comple>

[root@cosa-devsh ~]# systemctl status ignition-firstboot-complete.service
Unit ignition-firstboot-complete.service could not be found.

[root@cosa-devsh ~]# reboot

[root@cosa-devsh ~]# systemctl status coreos-ignition-firstboot-complete
○ coreos-ignition-firstboot-complete.service - CoreOS Mark Ignition Boot Complete
     Loaded: loaded (/usr/lib/systemd/system/coreos-ignition-firstboot-complete.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
  Condition: start condition failed at Tue 2021-07-06 19:15:34 UTC; 30s ago
             └─ ConditionKernelCommandLine=ignition.firstboot was not met
       Docs: https://docs.fedoraproject.org/en-US/fedora-coreos/

Jul 06 19:15:34 localhost systemd[1]: Condition check resulted in CoreOS Mark Ignition Boot Complete being skipped.

[root@cosa-devsh ~]# file /boot/ignition.firstboot
/boot/ignition.firstboot: cannot open `/boot/ignition.firstboot' (No such file or directory)

Copy link
Contributor

@bgilbert bgilbert left a comment

Choose a reason for hiding this comment

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

LGTM

@jlebon
Copy link
Member Author

jlebon commented Jul 7, 2021

Although this is pretty straightforward, it's also a fundamental piece of the Ignition integration. So let's hold this until releases next week to be safe.

@jlebon
Copy link
Member Author

jlebon commented Jul 7, 2021

@bgilbert convinced me we should do this now so that we can ship a fix for coreos/fedora-coreos-tracker#889 (comment) in the next set of releases.

@jlebon jlebon merged commit 4b896a4 into coreos:testing-devel Jul 7, 2021
@jlebon jlebon deleted the pr/move-firstboot-complete branch July 7, 2021 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants