Bug 1248472

Summary: [RFE] Content Partition Mounts should be enhanced for kickstart
Product: Red Hat Enterprise Linux 6 Reporter: Petr Hracek <phracek>
Component: preupgrade-assistant-contentsAssignee: Petr Hracek <phracek>
Status: CLOSED ERRATA QA Contact: Michal Kovarik <mkovarik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8CC: amahdal, fkluknav, mkovarik, ovasik, phracek, pstodulk, tpoitras, ttomecek
Target Milestone: rcKeywords: Extras, FutureFeature, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: preupgrade-assistant-contents-0.6.35-1 Doc Type: Enhancement
Doc Text:
To improve Kickstart generation by the Preupgrade assistant on RHEL 7 systems, content partition mounts now contain important information regarding partition, mount, list of block devices. As a result, the Preupgrade assistant is able to generate a Kickstart for RHEL 7 system based on old systems.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 23:32:39 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:
Bug Depends On:    
Bug Blocks: 1252916    
Attachments:
Description Flags
anaconda-ks.cfg
none
data.txt
none
raid-anaconda-ks.cfg
none
raid-data.txt
none
raid.ks none

Description Petr Hracek 2015-07-30 11:30:46 UTC
Description of problem:
Nowadays 'PartitionMounts' content stores /etc/fstab and /proc/partitions to /root/preupgrade directory.
Content should be enhanced so that it will stores partition layout about devices which are needed by kickstart.

Commands which can be used for it are e.g.: pvs, vgdisplay, lsblk, blkid etc.

Comment 2 Petr Hracek 2015-08-05 07:26:46 UTC
Hi Michal,

would you be able to provide output of commands like:
- lsblk -r
- pvs 
- vgs 
- lvdisplay -C 

All those commands are list/row based outputs.

Could you please also attach anaconda-ks.cfg file?

It would be welcome if machine will be raid, crypted and whatever you want.
Let's say complicated partitioning.

Comment 3 Michal Kovarik 2015-08-05 09:00:01 UTC
Created attachment 1059381 [details]
anaconda-ks.cfg

Comment 4 Michal Kovarik 2015-08-05 09:00:03 UTC
Created attachment 1059382 [details]
data.txt

Comment 5 Michal Kovarik 2015-08-06 13:41:59 UTC
Layout description:

VG created from:
encrypted pv (sda2)
pv(sda3)
encrypted RAID5(md0) created from 3 partitions (sda6,sda7,sd8)

LV:
encrypted lv_data mounted to /data
lv_root mounted to /


swap(sda5)
/boot(sda1)

Comment 6 Petr Hracek 2015-08-07 08:37:11 UTC
Preupgrade-assistant is not able to create a partitioning layout with LVM and disc drive devices.

https://github.com/phracek/preupgrade-assistant/commit/28dc6a6138f800de0119a7b72e00e5ebc6cb6fd0

When the raid devices will be supported then I will switch this bugzilla to POST.

Comment 7 Michal Kovarik 2015-08-11 12:15:59 UTC
adding example of raid device:

'/' on raid1 device from 2 partitions
'/home' on encrypted raid0 device from 2 partitions

Comment 8 Michal Kovarik 2015-08-11 12:16:09 UTC
Created attachment 1061472 [details]
raid-anaconda-ks.cfg

Comment 9 Michal Kovarik 2015-08-11 12:16:10 UTC
Created attachment 1061473 [details]
raid-data.txt

Comment 10 Michal Kovarik 2015-08-11 12:16:12 UTC
Created attachment 1061474 [details]
raid.ks

Comment 13 Alois Mahdal 2015-08-17 22:13:01 UTC
Can you be specific about what this change does?  Description does not do it for me.

(In reply to Petr Hracek from comment #0)
> Description of problem:
> Nowadays 'PartitionMounts' content stores /etc/fstab and /proc/partitions to
> /root/preupgrade directory.

OK.

> Content should be enhanced so that it will stores partition layout about
> devices which are needed by kickstart.

What are "devices which are needed by kickstart?"  Shouldn't it store all layout info?

Also, what is the format of the data, is that simply output from mentioned commands (in separate files)?  Or is that a YAML/JSON/XML/whatever structure?  And scope of the data?  Do I guess right that it's what one could see from the commands mentioned in comment 2?

Comment 14 Petr Hracek 2015-08-31 07:48:54 UTC
(In reply to Alois Mahdal from comment #13)
> Can you be specific about what this change does?  Description does not do it
> for me.
> 
We have to enhanced the content so that we are able to reconstruct partition layout for kickstart usage.

> (In reply to Petr Hracek from comment #0)
> > Description of problem:
> > Nowadays 'PartitionMounts' content stores /etc/fstab and /proc/partitions to
> > /root/preupgrade directory.
> 
> OK.
> 
> > Content should be enhanced so that it will stores partition layout about
> > devices which are needed by kickstart.
> 
> What are "devices which are needed by kickstart?"  Shouldn't it store all
> layout info?
> 
Yes, it stores all layout info definitely.

> Also, what is the format of the data, is that simply output from mentioned
> commands (in separate files)?  Or is that a YAML/JSON/XML/whatever
> structure?  And scope of the data?  Do I guess right that it's what one
> could see from the commands mentioned in comment 2?

Format data is row-based and separated by ';' for better parsing.
Data are taken by commands lsblk, vgs etc.

I did not update Doc Text yet. I will do it ASAP.

Comment 18 Michal Kovarik 2015-09-09 10:42:45 UTC
Verified with preupgrade-assistant-contents-0.6.36-1.el6.noarch and preupgrade-assistant-2.1.0-6.el6.x86_64. Required files are created and used by preupgrade-assistant for kickstart creation.

Comment 20 errata-xmlrpc 2015-11-19 23:32:39 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, 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://rhn.redhat.com/errata/RHBA-2015-2498.html