Description of problem: Seen in http://pkgs.devel.redhat.com/cgit/rpms/redhat-virtualization-host/commit/?h=rhevm-4.4-rhel-8.4&id=2d173c1335a7159fc278b2d6fa13522206621e2c the script removes anaconda logs and anaconda-ks.cfg This has been removed and added numerous times over the lifetime of RHVH 4. Version-Release number of selected component (if applicable): RHVH 4.4 and later How reproducible: Everytime Actual results: +mount squashfs-root/LiveOS/rootfs.img ${tmpdir} +rm -rf ${tmpdir}/var/log/anaconda ${tmpdir}/root/*ks* Expected results: Anaconda has the ability to not create this file using inst.nosave inst.nosave= This option, introduced in Red Hat Enterprise Linux 7.3, controls which Kickstart files and installation logs are saved to the installed system. It can be especially useful to disable saving such data when performing OEM operating system installations, or when generating images using sensitive resources (such as internal repository URLs), as these resources might otherwise be mentioned in kickstart files, or in logs on the image, or both. Possible values for this option are: input_ks - disables saving of the input Kickstart file (if any). output_ks - disables saving of the output Kickstart file generated by Anaconda. all_ks - disables saving of both input and output Kickstart files. logs - disables saving of all installation logs. all - disables saving of all Kickstart files and all installation logs. Multiple values can be combined as a comma separated list, for example: input_ks,logs If we don't wish to have these logs exist, then can we set this as a default on the kernel line, and if customers want the logs, they can remove or edit this variable on the kernel line?
I don't think it's a good idea to disable or remove logs by default, just as RHEL doesn't do so. And RHV-H is no different from RHEL in this regard - in *rare* cases in which somebody may be concerned with the information that may appear in logs, that specific customer should either add the option to not create the logs or remove from these from the system, however I can hardly think of the such a case. There are reasons why these files are created in the first place.
To clarify - the referenced code removes the logs and ks files during the build of the SquashFS image. These have no effect on what happens during the actual installation. And one can simply check to see that after the installation the Anaconda log files indeed exist under /var/log/anaconda directory. The anaconda-ks.cfg and original-ks.cfg will be indeed missing from the /root (user root home directory), but that has to do with the flow of the RHV-H installation, and unfortunately is not easy to fix.
Fixing this issue (for anaconda-ks.cfg file) requires modification of the Anaconda, so a patch was sent to the u/s Anaconda project: https://github.com/rhinstaller/anaconda/pull/3321
Not going to land in 8.4.0.1, moving out to 4.4.8 and back to POST since we are still waiting for RHEL 8 backport.
Test version: rhvh-4.4.9.2-0.20211011.0+1 Test result: After the installation the Anaconda log files exist under /var/log/anaconda directory. So the bug is fixed, change bug status to VERIFIED. # imgbase w You are on rhvh-4.4.9.2-0.20211011.0+1 # pwd /var/log/anaconda # ll total 15184 -rw-------. 1 root root 38590 Oct 12 10:16 anaconda.log -rw-------. 1 root root 3156 Oct 12 10:16 dbus.log -rw-------. 1 root root 66196 Oct 11 18:57 dnf.librepo.log -rw-------. 1 root root 120 Oct 11 18:57 hawkey.log -rw-------. 1 root root 3645655 Oct 12 10:17 journal.log -rw-------. 1 root root 0 Oct 11 18:57 ks-script-1h5wt0dw.log -rw-------. 1 root root 71 Oct 12 10:16 ks-script-1x5lx41t.log -rw-------. 1 root root 0 Oct 11 18:57 ks-script-1xr_o3bz.log -rw-------. 1 root root 0 Oct 12 10:16 ks-script-5sua91hd.log -rw-------. 1 root root 0 Oct 11 18:57 ks-script-fl7cg9vr.log -rw-------. 1 root root 0 Oct 12 10:16 ks-script-gty4rjxy.log -rw-------. 1 root root 139 Oct 11 18:57 ks-script-i80ylqve.log -rw-------. 1 root root 3095 Oct 11 18:57 ks-script-t632mtqx.log -rw-------. 1 root root 8678809 Oct 12 10:16 lvm.log -rw-------. 1 root root 501 Oct 12 10:16 packaging.log -rw-------. 1 root root 7951 Oct 12 10:16 program.log -rw-------. 1 root root 897744 Oct 12 10:16 storage.log -rw-------. 1 root root 2146860 Oct 12 10:16 syslog -rw-------. 1 root root 22592 Oct 12 10:16 X.log
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 (Important: Red Hat Virtualization Host security and bug fix update [ovirt-4.4.9] 0-day), 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:4750