WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@stejskalleos
Copy link
Contributor

Follow up to #9677 (credits @Dyrkon )

Move the callback home with the facts update to the first boot service.

  • The callback now really means done & running.
  • Subscription manager reports facts from the running system

Tested with CentOS Stream 10

Move the callback home with the facts update to the first boot service.
* The callback now really means done & running.
* Subscription manager reports facts from the running system
Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

@stejskalleos I had a question:
The first_boot_script.sh file contains the Foreman orchestration URL, which includes the JWT, should we keep that on the disk or setup systemd to self-destruct it after the first boot service?

[Service]
# Add a cleanup line to remove the script containing the token
ExecStartPost=/usr/bin/rm -f /root/first_boot_script.sh
ExecStartPost=/usr/bin/systemctl disable first_boot_service

@sbernhard
Copy link
Contributor

wouldn't it stay in a boot loop because the boot config would stay to boot from network and not start from disk?
This is actually the case from SLES for example if the "built" callback will not run after the host installation. foreman need to put the host out of the build mode.

actually, I would prefer to have a second stage:

  • built => change the boot order so that the host boot from disk instead of starting the network installation
  • initialized => now the host is really up => e.g. remove the puppet "autoaccept CSR"

@stejskalleos
Copy link
Contributor Author

The first_boot_script.sh file contains the Foreman orchestration URL, which includes the JWT, should we keep that on the disk or setup systemd to self-destruct it after the first boot service

Yes, deleting the file is a good idea.

wouldn't it stay in a boot loop because the boot config would stay to boot from network and not start from disk?

Hmm, you are right, wondering why my setup didn't stay in the loop.

@stejskalleos stejskalleos marked this pull request as draft December 8, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants