Bug 747974

Summary: ondisk option is ignored when executing clearpart in kickstart
Product: [Retired] Beaker Reporter: Vadim Grinco <vgrinco>
Component: lab controllerAssignee: Yang Ren <ryang>
Status: CLOSED NOTABUG QA Contact: Storage QE <storage-qe>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 0.7CC: bpeck, dcallagh, fge, jburke, mcsontos, rmancy, stl
Target Milestone: ---Keywords: Regression, Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-04 13:57:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vadim Grinco 2011-10-21 15:05:47 UTC
rhts_partitions snippet needs to be modified in order to take in account ondisk option in the kickstart metadata field when doing clearpart.

Now it does clearpart --all --initlabel which will destroy data on a hard disk you wish to save specifying ondisk=$other_disk and even worse: the install will fail if you have a multipath device.

Comment 1 Yang Ren 2011-12-02 03:36:41 UTC
(In reply to comment #0)
> rhts_partitions snippet needs to be modified in order to take in account ondisk
> option in the kickstart metadata field when doing clearpart.
> 
> Now it does clearpart --all --initlabel which will destroy data on a hard disk
> you wish to save specifying ondisk=$other_disk and even worse: the install will
> fail if you have a multipath device.

Will the fix "clearpart --drivers $ondisk --all --initlabel" solve your problem.
Did not clear all partitions just clear the target disk.

Comment 2 Vadim Grinco 2011-12-02 10:06:58 UTC
Yes, this should do it.

Comment 4 Gris Ge 2012-04-28 03:36:24 UTC
Re-open this bug.

After production beaker upgrade to 0.8.2, I got regression issue and might be introduced by this bug.

Before 0.8.1, I can use this "KickStart MetaData" options:
====
ondisk=/dev/disk/by-id/dm-uuid-mpath-360a98000572d574a4e6f6a5379754f78
====

But in 0.8.2, I got these error:
=====
The following error was found while parsing the kickstart configuration file:

The following problem occurred on line 51 of the kickstart file:

Specified nonexistent disk /dev/disk/by-id/dm-uuid-mpath-360a98000572d574a4e6f6a5379754f78 in clearpart command

install exited abnormally [1/1] 
The system will be rebooted when you press Ctrl-C or Ctrl-Alt-Delete.
=====


Now, only "ondisk=mpatha" can work, but this is NOT a good option for RHEL 6 as its mpath name is keeping changing.

This issue impact the WHOLE Storage-QE's testing, please prioritize it.

Setting Regression test and rise priority to URGENT. Storage-QE will take QA work.

TO workaround this issue, QE need to use this job.xml:
=====
            <ks_appends>
                <ks_append><![CDATA[
%end
ignoredisk --only-use=disk/by-id/scsi-360a98000572d574a4e6f63706772594b
]]></ks_append>
            </ks_appends>
=====

Comment 5 Gris Ge 2012-04-28 03:46:39 UTC
It might be caused by anaconda "clearpart" option doesn't support "/dev/disk/" path. I will check with their dev.

Even this is a bug of anaconda, I suggest we keep the old way.

Comment 6 Bill Peck 2012-04-30 15:34:03 UTC
(In reply to comment #4)
> Re-open this bug.
> 
> After production beaker upgrade to 0.8.2, I got regression issue and might be
> introduced by this bug.
> 
> Before 0.8.1, I can use this "KickStart MetaData" options:
> ====
> ondisk=/dev/disk/by-id/dm-uuid-mpath-360a98000572d574a4e6f6a5379754f78
> ====
> 
> But in 0.8.2, I got these error:
> =====
> The following error was found while parsing the kickstart configuration file:
> 
> The following problem occurred on line 51 of the kickstart file:
> 
> Specified nonexistent disk
> /dev/disk/by-id/dm-uuid-mpath-360a98000572d574a4e6f6a5379754f78 in clearpart
> command

Can you try passing the following:

ondisk=disk/by-id/dm-uuid-mpath-360a98000572d574a4e6f6a5379754f78

and please report the job number privately.

Thanks!

Comment 8 Gris Ge 2012-05-04 03:22:15 UTC
This option by pass this issue:
ondisk=/dev/disk/by-id/scsi-360a98000572d574a4e6f63706772594b

You are feel to close this bug or you want this bug for document update.

I will work with anaconda team to find a better way or better document for this kickstart option in Bug #817213.

Thanks.

Comment 9 Bill Peck 2012-05-04 13:57:30 UTC
closing, issue is with anaconda.