Bug 1785063
| Summary: | Post-installation scripts in Kickstart are not logging the STDOUT messages in ks-post.log | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Satyajit Das <sadas> |
| Component: | Provisioning | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED DUPLICATE | QA Contact: | Ondrej Gajdusek <ogajduse> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.6.0 | CC: | inecas, jstodola, kwalker, lzap, saydas, sshtein |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-03-01 09:40:50 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Satyajit Das
2019-12-19 03:16:42 UTC
What is the expected content of /root/ks-post.log from the example? The command "useradd Test" doesn't print anything to stdout, so there is nothing to log: [root@localhost ~]# useradd Test [root@localhost ~]# (In reply to Jan Stodola from comment #1) > What is the expected content of /root/ks-post.log from the example? I think you can look better at the Satellite Kickstart default %post section then the example here. I've tried it on RHEL-8.1 GA using the following kickstart file: [root@localhost ~]# cat original-ks.cfg lang en_US.UTF-8 keyboard us reboot text rootpw redhat timezone --utc America/New_York bootloader --location=mbr zerombr clearpart --all --initlabel autopart %packages %end %post --log=/root/ks-post.log subscription-manager register --username=test --password=test %end [root@localhost ~]# Logs from the %post script are present: [root@localhost ~]# cat /root/ks-post.log Registering to: subscription.rhsm.redhat.com:443/subscription HTTP error (401 - Unauthorized): Invalid user credentials [root@localhost ~]# Satyajit, could you please attach the kickstart file that's not working for you? (In reply to Jan Stodola from comment #5) > Satyajit, could you please attach the kickstart file that's not working for Can you look at Support Case 02536726, there this BZ is created. The kickstart file in the ticket logs only one %post section: %post --log=/mnt/sysimage/root/install.post.log ... %end The path for the log file doesn't seem correct and should be: %post --log=/root/install.post.log See RHEL documentation: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_an_advanced_rhel_installation/kickstart-script-file-format-reference_installing-rhel-as-an-experienced-user#post-script-in-kickstart-file_scripts-in-kickstart-file --log= Logs the script’s output into the specified log file. Note that the path of the log file must take into account whether or not you use the --nochroot option. For example, without --nochroot: %post --log=/root/ks-post.log and with --nochroot: %post --nochroot --log=/mnt/sysimage/root/ks-post.log Can you please retest with the correct path? Fixed in Satellite 6.10 *** This bug has been marked as a duplicate of bug 1997065 *** |