Bug 1424404

Summary: Atomic kickstart does not remove random seed
Product: Red Hat Enterprise Linux 7 Reporter: Marko Myllynen <myllynen>
Component: rhel-server-atomicAssignee: Colin Walters <walters>
Status: CLOSED NOTABUG QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: miabbott
Target Milestone: rcKeywords: Extras
Target Release: ---   
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: 2017-05-03 14:47:54 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 Marko Myllynen 2017-02-17 17:00:24 UTC
Description of problem:
RHEL 7 Atomic kickstart has this:

echo "Removing random-seed so it's not the same in every image."
rm -f /var/lib/random-seed

But in fact the random-seed is at /var/lib/systemd/random-seed, thus all Atomic images currently share the same seed.

Version-Release number of selected component (if applicable):
7.3.2

Comment 1 Colin Walters 2017-02-17 19:57:47 UTC
Hm.  The path is indeed incorrect.  However, I can't find the random seed in the current gold RHELAH cloud image.

```
# env LIBGUESTFS_BACKEND=direct guestmount --ro -a rhel-atomic-cloud-7.3.2-1.x86_64.qcow2 -m /dev/mapper/atomicos-root /mnt/guestfs/
# find /mnt/guestfs/ -name 'random-seed'
# 
```

And the same for current Fedora Atomic Host.  Maybe something else is deleting it?  

Did you actually *observe* the random seed being identical, or were you just reading the kickstart?

Comment 3 Marko Myllynen 2017-02-20 11:21:47 UTC
(In reply to Colin Walters from comment #1)
> 
> Did you actually *observe* the random seed being identical, or were you just
> reading the kickstart?

Yeah, I merely trusted the documentation :) So looks like a false positive.

> And the same for current Fedora Atomic Host.  Maybe something else is
> deleting it?  

I assume you are not using virt-sysprep(1) to clean up the given that there are some leftover installation time files under /root and /tmp, that would have been one possible explanation.

Thanks.

Comment 4 Micah Abbott 2017-05-03 14:47:54 UTC
I booted two instances of the latest cloud image (rhel-atomic-cloud-7.3.4-11.x86_64.qcow2) corresponding to RHELAH 7.3.4-1 and then compared sha256 checksums of the '/var/lib/systemd/randomseed' file.

$ ssh 192.168.122.55
Warning: Permanently added '192.168.122.55' (ECDSA) to the list of known hosts.
[cloud-user@atomichost ~]$ sudo sha256sum /var/lib/systemd/random-seed
c047d4f6d5c5e52a5c2b5aad67348bac172b92b30b997d46df072355820d3df2  /var/lib/systemd/random-seed


$ ssh 192.168.122.236
Warning: Permanently added '192.168.122.236' (ECDSA) to the list of known hosts.
[cloud-user@atomichost ~]$ sudo sha256sum /var/lib/systemd/random-seed
ec03970f47fb769374aa02f5afc4a42b02ae26912606b3dbe0c8cdcefba9ccf0  /var/lib/systemd/random-seed


Based on Colin's comment in #1 and these observations, I am going to close this.