Skip to content

Comments

flatcar-postinst: create reboot-required flag file for kured#15

Merged
pothos merged 1 commit intoflatcar-masterfrom
kai/kured
Dec 7, 2021
Merged

flatcar-postinst: create reboot-required flag file for kured#15
pothos merged 1 commit intoflatcar-masterfrom
kai/kured

Conversation

@pothos
Copy link
Member

@pothos pothos commented Dec 6, 2021

While locksmithd and FLUO interact with update-engine through DBus,
kured looks for Ubuntu's /run/reboot-required flag file.
Support kured by creating the flag file in the update post-install
action.

How to use

Apply an update with flatcar-update and see that kured will reboot the machine.

Testing done

Booted the built image and updated to it:

sudo systemctl mask --now locksmithd
wget https://bucket.release.flatcar-linux.net/flatcar-jenkins/developer/developer/boards/amd64-usr/2021.12.06+dev-flatcar-master-4330/flatcar_test_update.gz
sudo flatcar-update -V 1.2.3 -P flatcar_test_update.gz -D
ls /var/run/reboot-required # check that the flag file got created
  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
    ↑ will do in coreos-overlay

@pothos pothos requested a review from a team December 6, 2021 15:49
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Dec 6, 2021
This pulls in
flatcar/update_engine#15 to create the
Ubuntu-compatible /run/reboot-required flag file for kured.
Copy link
Contributor

@tormath1 tormath1 left a comment

Choose a reason for hiding this comment

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

LGTM and it's not harmful. :)

While locksmithd and FLUO interact with update-engine through DBus,
kured looks for Ubuntu's /run/reboot-required flag file.
Support kured by creating the flag file in the update post-install
action.
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Dec 6, 2021
This pulls in
flatcar/update_engine#15 to create the
Ubuntu-compatible /run/reboot-required flag file for kured.
echo "Setup ${INSTALL_LABEL} (${INSTALL_DEV}) for next boot."

# Create the Ubuntu-compatible /run/reboot-required flag file for kured
touch /run/reboot-required
Copy link
Member

Choose a reason for hiding this comment

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

Can/Should this be tested somehow?

Copy link
Member Author

Choose a reason for hiding this comment

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

At least I want to run a test with using the OEM hook that gets called earlier. I'll also try to run kured manually on a built image and will merge when done.

Copy link
Member Author

Choose a reason for hiding this comment

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

Running the kured container without K8s doesn't really work easily but I checked that the file gets created.

@pothos pothos merged commit 04a7685 into flatcar-master Dec 7, 2021
@pothos pothos deleted the kai/kured branch December 7, 2021 16:18
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Dec 7, 2021
This pulls in
flatcar/update_engine#15 to create the
Ubuntu-compatible /run/reboot-required flag file for kured.
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.

3 participants