Bug 1953685 - The RHVH iso should not always remove the /root/anaconda-ks.cfg file.
Summary: The RHVH iso should not always remove the /root/anaconda-ks.cfg file.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: redhat-virtualization-host
Version: 4.4.6
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ovirt-4.4.9
: ---
Assignee: Lev Veyde
QA Contact: cshao
URL:
Whiteboard:
Depends On: 1970879
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-26 16:18 UTC by jcastran
Modified: 2024-12-20 19:57 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1970879 (view as bug list)
Environment:
Last Closed: 2021-11-19 19:21:53 UTC
oVirt Team: Node
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rhinstaller anaconda pull 3321 0 None open Move post installation scripts to the end of queue for RHV-H 2021-04-27 18:19:38 UTC
Red Hat Product Errata RHSA-2021:4750 0 None None None 2021-11-19 19:22:19 UTC

Description jcastran 2021-04-26 16:18:42 UTC
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?

Comment 1 Lev Veyde 2021-04-27 08:44:52 UTC
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.

Comment 2 Lev Veyde 2021-04-27 11:36:23 UTC
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.

Comment 3 Lev Veyde 2021-04-27 18:19:07 UTC
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

Comment 5 Sandro Bonazzola 2021-06-24 14:38:26 UTC
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.

Comment 8 cshao 2021-10-14 02:38:52 UTC
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

Comment 10 errata-xmlrpc 2021-11-19 19:21:53 UTC
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


Note You need to log in before you can comment on or make changes to this bug.