Bug 1324219 - Hide anaconda build logs and kickstart
Summary: Hide anaconda build logs and kickstart
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-node
Classification: oVirt
Component: Build
Version: 4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.0
: 4.2
Assignee: Yuval Turgeman
QA Contact: Qin Yuan
URL:
Whiteboard:
: 1340490 1371363 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-05 20:59 UTC by Fabian Deutsch
Modified: 2017-12-20 11:22 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-20 11:22:11 UTC
oVirt Team: Node
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: planning_ack+
fdeutsch: devel_ack+
ycui: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 69126 0 master MERGED Moving anaconda logs to /var/log/anaconda-install 2017-01-05 14:37:37 UTC
oVirt gerrit 77132 0 ovirt-4.1 ABANDONED Moving anaconda logs to /var/log/anaconda-install 2017-05-22 18:29:13 UTC
oVirt gerrit 77448 0 master MERGED build: not saving anaconda build logs 2017-06-05 07:49:03 UTC
oVirt gerrit 81862 0 master MERGED build: move build logs to exported artifacts 2017-09-26 23:15:06 UTC
oVirt gerrit 82256 0 ovirt-4.2-pre MERGED build: move build logs to exported artifacts 2017-09-26 23:15:38 UTC
oVirt gerrit 82257 0 ovirt-4.2-snapshot MERGED build: move build logs to exported artifacts 2017-09-26 23:15:50 UTC
oVirt gerrit 82258 0 ovirt-4.2-snapshot POST build: move build logs to exported artifacts 2017-09-26 23:15:26 UTC

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.


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