Bug 832688

Summary: raid --useexisting errors without partitions
Product: Red Hat Enterprise Linux 6 Reporter: Shad L. Lords <slords>
Component: pykickstartAssignee: Chris Lumens <clumens>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: atodorov, bcl, clumens, despite, jreed, lkardos, slords, wnefal+redhatbugzilla
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: pykickstart-1.74.11-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 741728 Environment:
Last Closed: 2013-02-21 09:07:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shad L. Lords 2012-06-16 13:29:07 UTC
+++ This bug was initially created as a clone of Bug #741728 +++

Description of problem:
The following kickstart command, which worked as expected in older versions of kickstart, errors with "Partitions required for raid":

raid /boot --fstype=ext4 --level=1 --device=md0 --useexisting

Partitions should not be required when --useexisting is used.  The cause is commit 3fa478da.. which added this check at pykickstart/commands/raid.py:207:

         if len(extra) == 1:
             raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Partitions required for %s") % "raid")

That should allow for --useexisting.

Version-Release number of selected component (if applicable):
At least Fedora 14 and newer.

How reproducible:
Always.

Steps to Reproduce:
1. Create a kickstart with 'raid /boot --fstype=ext4 --level=1 --device=md0 --useexisting'
2.
3.
  
Actual results:
Before Anaconda fully loads you get "Error parsing kickstart: Partitions required for raid"

Expected results:
Kickstart parses correctly, Anaconda installs system.

Additional info:
I've confirmed that everything works when these lines are removed.  I am not sure how to check for useexisting at that spot in the code.

--- Additional comment from clumens on 2011-10-05 10:51:23 EDT ---

Patch to fix this posted:

https://www.redhat.com/archives/anaconda-devel-list/2011-October/msg00028.html

Comment 2 RHEL Program Management 2012-07-16 22:47:49 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 3 Chris Lumens 2012-09-14 15:28:34 UTC
I pushed pykickstart-1.74.7-1 for RHEL 6.3 specifically for this problem.  Can you please verify you are testing with that build and let me know if you are still seeing problems?

Comment 4 Shad L. Lords 2012-09-14 16:36:24 UTC
I'm pretty sure I'm using 1.74.10-1.  If you can tell me which file I can check to see if the fix is in I'll check to see if it has it.

Comment 5 Chris Lumens 2012-09-14 17:05:09 UTC
What release of RHEL are you using?

Comment 6 Shad L. Lords 2012-09-14 17:07:16 UTC
I'm using a RHEL6.3 + Updates rebuild ISO

Comment 7 Shad L. Lords 2012-09-21 18:18:20 UTC
I've just verified that the raid part is working with --useexisting.  It is the volgroup that is now failing.

I specify it like:

volgroup myvg --useexisting

This worked in rhel5 but says that it must be given a list of partitions in rhel6.

If I have an existing raid set with an existing set of volgroup/logvol set that I want to re-use is there a way to specify this in a ks file?

I'm wanting to wipe/format the /boot (on raid1) and /, /var (logvols) but keep the /data (different logvol on same volgroup) without formatting it.

The setup I had for rhel5 isn't working.

Comment 8 Shad L. Lords 2012-09-21 20:05:43 UTC
After further experimentation I can get things working the way I want.  This bug can be closed as full functionality is available even though paramaters are different between el5 and el6.

Comment 9 Chris Lumens 2012-09-24 14:26:25 UTC
Okay, this is already filed in a couple private bugs and I've rebuilt pykickstart-1.74.11-1 for the next minor release.

Comment 11 Ľuboš Kardoš 2012-12-12 10:13:48 UTC
Verified on RHEL6.4-20121206.0

Comment 12 errata-xmlrpc 2013-02-21 09:07:43 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.

http://rhn.redhat.com/errata/RHBA-2013-0507.html