Bug 1324219

Summary: Hide anaconda build logs and kickstart
Product: [oVirt] ovirt-node Reporter: Fabian Deutsch <fdeutsch>
Component: BuildAssignee: Yuval Turgeman <yturgema>
Status: CLOSED CURRENTRELEASE QA Contact: Qin Yuan <qiyuan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: bugs, cshao, fdeutsch, huzhao, leiwang, mwest
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
rule-engine: planning_ack+
fdeutsch: devel_ack+
ycui: testing_ack+
Target Release: 4.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:22:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fabian Deutsch 2016-04-05 20:59:16 UTC
Description of problem:
anaconda puts the ks used for building into /root/*.ks and the logs into /var/log/anaconda.

We should keep these artifacts for debugging, but should keep them elsewhere to hide them from the users.

Probably a task for imgbase build --postprocess.

Comment 1 Sandro Bonazzola 2016-05-02 09:53:46 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 2 Fabian Deutsch 2016-08-29 15:56:59 UTC
/var/log/anaconda should be removed by imgbased

Comment 3 Fabian Deutsch 2016-08-30 06:15:07 UTC
/root/anaconda-ks.cfg should also be removed

Comment 4 Fabian Deutsch 2016-08-30 06:17:33 UTC
*** Bug 1371363 has been marked as a duplicate of this bug. ***

Comment 5 Fabian Deutsch 2016-12-21 10:04:26 UTC
The logs should actually not get _removed_ but rather moved out of sight, i.e. into /var/log/anaconda-install/

Comment 6 Douglas Schilling Landgraf 2017-01-11 15:58:05 UTC
*** Bug 1340490 has been marked as a duplicate of this bug. ***

Comment 7 Yuval Turgeman 2017-02-09 12:47:56 UTC
The ks.cfg and anaconda logs are copied to the image after the post install scripts are finished, so we can't use imgbased to hide the logs.  Instead of hiding the logs, perhaps we could use inst.nosave=all to avoid copying those files at all, if this is acceptable.

Comment 8 Fabian Deutsch 2017-02-09 16:51:30 UTC
Interesting.

You can use the arg to avoid the logs, but then you don't have them for debugging.
Otherwise you could add a task to imgbase postprocessing to move them away.

I'm not sure what the better solution is.

Comment 9 Yuval Turgeman 2017-02-12 09:28:16 UTC
(In reply to Fabian Deutsch from comment #8)
> Interesting.
> 
> You can use the arg to avoid the logs, but then you don't have them for
> debugging.
> Otherwise you could add a task to imgbase postprocessing to move them away.
> 
> I'm not sure what the better solution is.

postprocess runs inside the kickstart's %post when building the image, and anaconda copies the logs to the image after kickstart's %post.  The only way is either to not copy them at all (nosave), or in the first boot of the image.

Comment 10 cshao 2017-07-17 03:08:47 UTC
There is no 4.2 build deliver to QE for testing, so move this bug to MODIFIED status.

Comment 11 Yuval Turgeman 2017-09-13 11:31:19 UTC
After discussing this with qe, hiding all logs is not a good idea, considering an alternate solution.

Comment 12 Red Hat Bugzilla Rules Engine 2017-09-13 11:31:24 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 13 Qin Yuan 2017-10-16 10:17:06 UTC
Test Versions:
ovirt-node-ng-installer-ovirt-4.2-pre-2017092713.iso

Test Steps:
1. Install the iso
2. After installation finished, check:
  # ls /root
  # ls -al /var/log/anaconda

Test Results:
1. There is no *ks* under /root
2. There is no build log under /var/log/anaconda:
[root@dell-per730-34 ~]# ls -al /var/log/anaconda/
total 3252
drwxr-xr-x.  2 root root    4096 Oct 16  2017 .
drwxr-xr-x. 19 root root    4096 Oct 16 09:55 ..
-rw-------.  1 root root   23837 Oct 16  2017 anaconda.log
-rw-------.  1 root root   49421 Oct 16  2017 ifcfg.log
-rw-------.  1 root root 1946623 Oct 16  2017 journal.log
-rw-------.  1 root root       0 Oct 16  2017 ks-script-9YPO5i.log
-rw-------.  1 root root       0 Oct 16  2017 ks-script-DX1dU7.log
-rw-------.  1 root root    2169 Oct 16  2017 ks-script-rrqSGw.log
-rw-------.  1 root root     214 Oct 16  2017 packaging.log
-rw-------.  1 root root  254897 Oct 16  2017 program.log
-rw-------.  1 root root  551389 Oct 16  2017 storage.log
-rw-------.  1 root root  456948 Oct 16  2017 syslog
-rw-------.  1 root root   15905 Oct 16  2017 X.log

In addition, checked ovirt-node-ng_ovirt-4.2-pre_build-artifacts, the anaconda-ks.cfg, original-ks.cfg and build logs are under exported-artifacts/image-logs, just as designed.

So, set the bug status to VERIFIED.

Comment 14 Sandro Bonazzola 2017-12-20 11:22:11 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.