Bug 915272 - RFE: add autopart type ks_meta option
Summary: RFE: add autopart type ks_meta option
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.11
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 0.15.3
Assignee: Amit Saha
QA Contact: tools-bugs
URL:
Whiteboard: Kickstart
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-25 11:11 UTC by Jan Stancek
Modified: 2018-02-06 00:41 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-03 04:52:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Stancek 2013-02-25 11:11:20 UTC
Description of problem:
Recent versions of anaconda support filesystem parameter (--type) in "autopart":
https://fedoraproject.org/wiki/Anaconda/Kickstart#autopart
This is feature request to support ks_meta option, which allows to set --type for "autopart".

Beaker already has "rootfstype", which appears to emulate "autopart --type=" on distros, which don't support it, but the result may not be the same. In my opinion "autopart --type" should be the preferred way if it is supported.

This could be done by passing rootfstype value to "autopart --type=" on distros which support it (RHEL7) or by introducing completely new ks_meta option.

Comment 2 Jan Stancek 2013-04-11 08:49:02 UTC
Anaconda changed the meaning, now it's one of: "lvm, btrfs, plain", and I can't see an option to choose default filesystem type without using 'part' or 'logvol'.

Comment 3 Nick Coghlan 2013-09-30 01:18:07 UTC
Potentially related, note that bug 908354 allows Beaker 0.13.2+ to create simple btrfs partitions with recent anaconda versions.

Comment 5 Jan Stancek 2013-10-23 07:37:59 UTC
(In reply to Nick Coghlan from comment #3)
> Potentially related, note that bug 908354 allows Beaker 0.13.2+ to create
> simple btrfs partitions with recent anaconda versions.

The BZ number above doesn't look correct.

To clarify: this BZ is about having some simple way to choose root file system (xfs/ext4/btrfs) without the need for custom kickstarts.

Comment 6 Nick Coghlan 2013-10-25 04:56:43 UTC
Sorry, I meant bug 973595 for the current btrfs support in Beaker 0.13/14/15. I don't how I came up with the previous incorrect bug reference.

Comment 7 Amit Saha 2014-01-15 02:45:11 UTC
Currently we have this line at the end of Server/bkr/server/snippets/rhts_partitions:


#}
autopart
{% endif %}

So, to implement this feature we could have something like this instead (in semi pseudo-code):

{% if autopart_type and distro is "Fedora18+" or distro is "RHEL7+" %}
autopart --type autopart_type
{% else %}
autopart
{%endif%}

PS: FWIW, this seems to have been added to anaconda in this commit: https://git.fedorahosted.org/cgit/anaconda.git/commit/?id=eb17cee2b0a9185795509fa7c32405a974b9589e

Comment 8 Nick Coghlan 2014-01-15 03:51:11 UTC
Yes, that looks good to me. That way, setting rootfstype will still mean avoiding autopart entirely, while setting the new autopart_type option will allow autopart to be configured appropriately.

Comment 9 Amit Saha 2014-01-15 05:46:17 UTC
Great, the patch is up on Gerrit: http://gerrit.beaker-project.org/#/c/2688/1

Comment 11 Amit Saha 2014-01-16 02:30:28 UTC
(In reply to Jan Stancek from comment #5)
> (In reply to Nick Coghlan from comment #3)
> > Potentially related, note that bug 908354 allows Beaker 0.13.2+ to create
> > simple btrfs partitions with recent anaconda versions.
> 
> The BZ number above doesn't look correct.
> 
> To clarify: this BZ is about having some simple way to choose root file
> system (xfs/ext4/btrfs) without the need for custom kickstarts.

The wiki page [1] mentions that the value for "--type" should be a partitioning scheme,  not a file system type. In fact, Anaconda merrily accepted "xfs" as a type and used "xfs" to create the partitions. So, either the wiki page needs updating or this is a bug in Anaconda. 

Or, am I confused?

[1] http://fedoraproject.org/wiki/Anaconda/Kickstart#autopart

Comment 13 xjia 2014-01-16 06:33:44 UTC
For "lvm", it's going to create LVM. Indeed it works.
[root@dev-kvm-guest-01 ~]# df -TH
Filesystem                                Type      Size  Used Avail Use% Mounted on
/dev/mapper/rhel_dev--kvm--guest--01-root xfs        19G  1.7G   18G   9% /
devtmpfs                                  devtmpfs  516M     0  516M   0% /dev
tmpfs                                     tmpfs     522M     0  522M   0% /dev/shm
tmpfs                                     tmpfs     522M  6.9M  515M   2% /run
tmpfs                                     tmpfs     522M     0  522M   0% /sys/fs/cgroup
/dev/sda1                                 xfs       507M  105M  403M  21% /boot

Comment 14 xjia 2014-01-16 07:12:20 UTC
For beaker, have added autopart_type to allow user's to specify --type, what Anaconda does with it is a different point. So verify this bug.

Comment 15 Nick Coghlan 2014-02-03 04:52:14 UTC
This change is included in the Beaker 0.15.3 maintenance release:

http://beaker-project.org/docs/whats-new/release-0.15.html#beaker-0-15-3


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