Bug 1198881

Summary: allow a recipe to specify custom partitioning commands in <partitions/>
Product: [Retired] Beaker Reporter: XiaoNi <xni>
Component: lab controllerAssignee: matt jia <mjia>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 19CC: aigao, bdonahue, dcallagh, dowang, ebaak, jbastian, jbrier, mjia, yanwang
Target Milestone: 21.0Keywords: FutureFeature, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-26 06:17:05 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:

Comment 2 Dan Callaghan 2015-03-12 03:16:34 UTC
Beaker supplies autopart (or else, some suitable part commands) in the kickstart template when it provisions the recipe. The actual source is here:

https://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/snippets/rhts_partitions

(This snippet is included into the main kickstart template.)

I think the nicest solution here would be to allow raw commands in the <partitions/> element, so that you can pass whatever commands you want and autopart/part from the template will be skipped.

<partitions>
part raid.01 --size=20480 --ondisk=sda
...
volgroup ...
</partitions>

This idea has come up on the mailing list a few times before, but it seems nobody ever got around to filing it or implementing it yet :-)

Comment 3 matt jia 2015-05-21 06:26:56 UTC
(In reply to Dan Callaghan from comment #2)
> Beaker supplies autopart (or else, some suitable part commands) in the
> kickstart template when it provisions the recipe. The actual source is here:
> 
> https://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/snippets/
> rhts_partitions
> 
> (This snippet is included into the main kickstart template.)
> 
> I think the nicest solution here would be to allow raw commands in the
> <partitions/> element, so that you can pass whatever commands you want and
> autopart/part from the template will be skipped.
> 
> <partitions>
> part raid.01 --size=20480 --ondisk=sda
> ...
> volgroup ...
> </partitions>
> 
> This idea has come up on the mailing list a few times before, but it seems
> nobody ever got around to filing it or implementing it yet :-)

I have tried this approach and here is the patch.

http://gerrit.beaker-project.org/#/c/4221/

But I donnot like it as I think it introduces more complex logic into the rhts_partitions snippet. I am thinking it would be easy to add a new variable into custom kickstrat metata to disable the autopart. In this case, users can put raw commands into <ks_appends/> for their needs.

Comment 4 Dan Callaghan 2015-06-09 23:20:43 UTC
(In reply to matt jia from comment #3)

Yes I think you're right. The point of <partitions/> is to abstract away the kickstart syntax, if someone really wants to supply raw kickstart commands we already have <ks_appends/> for that.

So let's just add a new ksmeta variable no_autopart which suppresses the autopart command in the template. So if you pass no_autopart is ksmeta (and also no partitions in ksmeta, nor <partitions/>) then there will simply be no partitioning commands at all, and then you can supply your own using <ks_appends/>.

Comment 7 Dan Callaghan 2015-08-26 06:17:05 UTC
Beaker 21.0 has been released.

Comment 8 Dan Callaghan 2016-02-12 05:34:03 UTC
*** Bug 829780 has been marked as a duplicate of this bug. ***