-
Notifications
You must be signed in to change notification settings - Fork 993
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
Fixes #35378 - Add systemd first boot service for host provisioning #9677
base: develop
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
app/views/unattended/provisioning_templates/snippet/first_boot_setup_service.erb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this reinventing cloud-init? Foreman already has cloud-init templates so would it make sense to leverage cloud-init? Even if it's only to call home.
app/views/unattended/provisioning_templates/provision/kickstart_default.erb
Show resolved
Hide resolved
dbba291
to
7ed2a22
Compare
I read through If |
app/views/unattended/provisioning_templates/snippet/fist_boot_setup_script.erb
Outdated
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/fist_boot_setup_script.erb
Outdated
Show resolved
Hide resolved
7ed2a22
to
a2a3d85
Compare
a2a3d85
to
e871fa0
Compare
e871fa0
to
b573c82
Compare
Thanks for the recommendation @ekohl . I have looked into I have tested phone_home:
url: <%= foreman_url('built') %>
post: []
tries: 10 The result is the same as with my solution, but there is one thing I am a bit worried about.
|
b573c82
to
82f5cb9
Compare
Currently I am exploring the usage of initd script which works fine as the network is ready before executing any of these scripts. As systemd services replaced initd scripts I think this is the way to go. |
12128e4
to
b5368d8
Compare
b5368d8
to
3fbedce
Compare
Should be ready to test. The current solution uses systemd and for OSes that don't support systemd (RHEL6), there is also init.d script prepared. |
app/views/unattended/provisioning_templates/snippet/first_boot_service.erb
Outdated
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/first_boot_setup.erb
Outdated
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/first_boot_service.erb
Outdated
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/first_boot_service.erb
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/first_boot_setup.erb
Outdated
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/first_boot_setup.erb
Outdated
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/first_boot_setup.erb
Outdated
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/first_boot_setup.erb
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/first_boot_setup.erb
Outdated
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/first_boot_service.erb
Outdated
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/snippet/first_boot_service.erb
Show resolved
Hide resolved
3fbedce
to
4eca119
Compare
ok to test |
app/views/unattended/provisioning_templates/provision/kickstart_default.erb
Show resolved
Hide resolved
4eca119
to
0f4a6f7
Compare
This PR is ready for review. Does anyone have any comments or questions regarding the implementation? |
Does this affect other systems, too? |
Right now only the RHEL family
We need to verify/merge it first, keep it for a while to see if it's not breaking any stuff, and later on implement it also for Debian. But no work is planned in the upcoming future. |
@Dyrkon can you please rebase the branch over the |
0f4a6f7
to
b4a107a
Compare
b4a107a
to
768a4e8
Compare
768a4e8
to
d68578a
Compare
d68578a
to
4a3b8dc
Compare
This PR implements some improvements suggested in RFC - Systemd first boot service for host provisioning.
The main one is reducing
%post
section and moving some of it to service which is going to run after the first reboot of the machine.This should also ensure that the callback to foreman indicating that the build is done is going to be made only from a machine that successfully rebooted and is ready to use.
This solution was successfully tested on Centos 7, Stream 8 and Stream 9 with libvirt.