Created attachment 1817132 [details] anaconda prompt Description of problem: During the provisioning , after generating initramfs , the screen is changed to [anaconda root@hostname /]# instead of showing the postinstall steps while the postinstall steps are running on the background. Version-Release number of selected component (if applicable): satellite 6.10 How reproducible: 100% Steps to Reproduce: 1. Provision and new machine and monitor the installation from the machine console Actual results: Screen with prompt [ anaconda root@HOSTNAME /] # Screenshot attached. Expected results: The log of postinstall scripts (finish template) Additional info: - On the satellite the provisioned machine state is error until the anaconda reboot is done. - It caused confusion that the provisioning is failed while it is still running on the background which will occur with the customer as well. - On previous satellite versions (6.9) kickstart default contains the following : ----- %post --log=/root/install.post.log logger "Starting anaconda HOSTNAME postinstall" exec < /dev/tty3 > /dev/tty3 #changing to VT 3 so that we can see whats going on.... /usr/bin/chvt 3 ----- Which is removed on 6.10 ---- %post --log=/root/install.post.log logger "Starting anaconda HOSTNAME postinstall" ----
Lukas, Is this expected behavior with Satellite 6.10?
Hello, we haven't removed chvt command, it was just refactored in https://projects.theforeman.org/issues/28521 but it stayed in the same place as it was. Instead of changing to 3 and back to 1 for both post and no root post, it is changed just once. It is possible that Anaconda changes order of execution of post scripts, in that case, we would need to change twice. This will not work for RHEL8 tho, there is tmux in use. If you add chvt 1 before the %end and then add chvt 3 and chvt 1 to the %post section, does it work?
(In reply to Lukas Zapletal from comment #2) > Hello, > > we haven't removed chvt command, it was just refactored in > https://projects.theforeman.org/issues/28521 but it stayed in the same place > as it was. Instead of changing to 3 and back to 1 for both post and no root > post, it is changed just once. > > It is possible that Anaconda changes order of execution of post scripts, in > that case, we would need to change twice. > > This will not work for RHEL8 tho, there is tmux in use. > > If you add chvt 1 before the %end and then add chvt 3 and chvt 1 to the > %post section, does it work? Hello, 1) Adding the following did not fix the issue : """ If you add chvt 1 before the %end and then add chvt 3 and chvt 1 to the %post section, does it work? """ 2) On https://projects.theforeman.org/projects/foreman/repository/revisions/bb4633bcd4facc339a8099f4a8e89312323d8b61/diff i can find that the following lines have been removed : - before %end """ /usr/bin/chvt 1 ) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log <%= section_end -%> """ - %post section """ exec < /dev/tty3 > /dev/tty3 #changing to VT 3 so that we can see whats going on.... /usr/bin/chvt 3 <%= snippet_if_exists(template_name + " custom post") %> """
Right, I filed https://projects.theforeman.org/issues/33426 and made a patch https://github.com/theforeman/foreman/pull/8765 Can you test it for me please?
Upstream bug assigned to lzap
(In reply to Lukas Zapletal from comment #4) > Right, > > I filed https://projects.theforeman.org/issues/33426 and made a patch > https://github.com/theforeman/foreman/pull/8765 > > Can you test it for me please? Using the patch https://github.com/theforeman/foreman/pull/8765 works as expected for both RHEL 7 and 8. Thanks Lukas
Thanks a bunch.
VERIFIED on both RHEL 7 and RHEL 8. The output of the %post script is now visible to the user and is present in the respective files in /root on the installed system. foreman-2.5.2.13-1.el7sat.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:4702
*** Bug 1785063 has been marked as a duplicate of this bug. ***
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days