Bug 1321959

Summary: anaconda-ks.cfg part doesnt reflect reallity
Product: Red Hat Enterprise Linux 7 Reporter: Andrej Manduch <amanduch>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: amanduch, jkonecny
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-06 18:09:13 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:
Attachments:
Description Flags
Original Kickstart
none
output kickstart none

Description Andrej Manduch 2016-03-29 13:19:31 UTC
Description of problem:

When I installed Centos7.2 using kickstart eveything went fine but output kickstart doesn't correspond to original kickstart that I used for installation nor state of installed system.

In original kickstart I had those lines:

clearpart --all --initlabel --drives=vda
part /boot    --size=800 --fstype="xfs" --ondisk=vda
part /        --onpart=/dev/vdb
part /var/log --onpart=/dev/vdc

However in output counterpart (/root/anaconda-ks.cfg) was only:

# Partition clearing information
clearpart --all --initlabel --drives=vda
# Disk partitioning information
part /boot --fstype="xfs" --ondisk=vda --size=800

However system and partitions were installed corretly:

[root@jenkins-01 ~]# mount | grep /dev/vd
/dev/vdb on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/vdc on /var/log type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/vda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)


Version-Releapuse number of selected component (if applicable):

# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 


How reproducible:

Every time.

Steps to Reproduce:
1. Create 2+ (3 in my case) lun/lvm volumes/files/whatever you can use as block device
2. Add those block devices to virtual machine
3. Install Enterprise Linux 7
4. Compare Kickstarts

(note for the one who will be reproducing this:
step 2 and 3 I did using this command:
virt-install --name=jenkins-01 --memory=1024 --vcpus=1 --location http://merlin.fit.vutbr.cz/mirrors/centos/7.2.1511/os/x86_64/ --disk /dev/mapper/vgsys-thm_jenkins01_boot --disk /dev/mapper/vgsys-thm_jenkins01_root --disk /dev/mapper/vgsys-thm_jenkins01_vlog --initrd-inject /root/kickstarts/jenkins-01.ks --extra-args "ks=file:/jenkins-01.ks" --mac 52:54:00:30:15:cb --vnc
and I guess it's the easiest way)

Actual results:

/root/anaconda-ks.cfg disk partitioning part didn't match original kickstart nor reallity.

Expected results:

/root/anaconda-ks.cfg should similiar to original kickstart.

Additional info:

In next comments I'm attaching original and output kickstarts.

Comment 1 Andrej Manduch 2016-03-29 13:24:32 UTC
Created attachment 1141247 [details]
Original Kickstart

Comment 2 Andrej Manduch 2016-03-29 13:24:59 UTC
Created attachment 1141248 [details]
output kickstart

Comment 4 Brian Lane 2016-05-26 21:11:40 UTC
This is probably due to this:

clearpart --all --initlabel --drives=vda

What happens if you use:

clearpart --all --initlabel --drives=vda,vdb,vdc


In general you need to list all the disks you are using in --drives.

Comment 5 Andrej Manduch 2016-06-06 13:40:08 UTC
Hi Brian,

I actually can't do that, /dev/vdb and /dev/vdc are pre-formated partition and I don't want anaconda to touch them.

(I didn't test this recently but I did that when I was writing that kickstart) If I remember correctly, in that case anaconda would fail kickstart, which is not that suprising because clearpart is for clearing partitions on drive, however in this case vdb and vdc are partitions.

Comment 6 Brian Lane 2016-06-06 18:09:13 UTC
Ah, I see. Since you have this in your ks:

part /var/log --onpart=/dev/vdc

Anaconda is going to want to format that. If you just want it to mount it, add --noformat like this:

part /var/log --onpart=/dev/vdc --noformat

Comment 7 Andrej Manduch 2016-06-08 12:22:44 UTC
Hi Brian,

I have feeling that you didn't quite understand where the problem was. Though I can't blame you because I wasn't clear enought.

The problem wasn't that anaconda didn't install system properly. System was installed in fact correctly. However those line:
part /        --onpart=/dev/vdb
part /var/log --onpart=/dev/vdc

Didn't appeared in /root/anaconda-ks.cfg but they were mounted on correct places and system was installed on them as I stated:
[root@jenkins-01 ~]# mount | grep /dev/vd
/dev/vdb on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/vdc on /var/log type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/vda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)

I still think this is a bug, However It's very very low priority bug (which should I stated at the first place, but still a bug)

Comment 8 Brian Lane 2016-06-10 00:00:42 UTC
Can you try adding --noformat and see if they show up as expected?

Comment 9 Andrej Manduch 2016-09-09 16:22:47 UTC
Hi Brian,

Sorry that I didn't responded in long time, i didn't have access to that system on which I can reproduce that easilly.

Actually I don't understand why should I put --noformat there, my bug report wasn't about problems with installing system. My system is installed correctly as I expected. Every partition is mounted where I wanted it. The problem is just that output kickstart (/root/anaconda-ks.cfg) isn't aware about those partition and if I used that kickstart for another installation new system would not be same as original one.


However I did try to put --noformat at the end of `part /var/log --onpart=/dev/vdc`

so it looked like this:

clearpart --all --initlabel --drives=vda
part /boot    --size=800 --fstype="xfs" --ondisk=vda
part /        --onpart=/dev/vdb
part /var/log --onpart=/dev/vdc --noformat


system was installed as expected

[root@jenkins-01 ~]# mount | grep vd
/dev/vdb on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/vdc on /var/log type xfs (rw,relatime,seclabel,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota)
/dev/vda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)


Hoewer output kickstart looks still the same:

# Partition clearing information
clearpart --all --initlabel --drives=vda
# Disk partitioning information
part /boot --fstype="xfs" --ondisk=vda --size=800

%packages