Bug 628097 - RHN Satellite: only one swap LVM device allowed in kickstart profile
Summary: RHN Satellite: only one swap LVM device allowed in kickstart profile
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 530
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Partha Aji
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: sat540-blockers
TreeView+ depends on / blocked
 
Reported: 2010-08-27 21:56 UTC by Xixi
Modified: 2018-10-27 13:33 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-28 14:55:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed patch (1.06 KB, patch)
2010-08-27 21:57 UTC, Xixi
no flags Details | Diff

Description Xixi 2010-08-27 21:56:08 UTC
Description of problem:
Satellite web UI does not allow multiple swap LV's to be entered in a kickstart profile's System Details > Partitioning tab. If you enter, for example:

logvol swap --fstype swap --name=swap2 --vgname=myvg --size=1984
logvol swap --fstype swap --name=swap1 --vgname=myvg --size=1984

then clicking on the Update Partitions button generates an error message at the top of the page: "Only one swap partition is allowed."

Version-Release number of selected component (if applicable):
Red Hat Network (RHN) Satellite 5.3.0

How reproducible:
Always.

Steps to Reproduce:
1. <see above>

Actual results:
"Only one swap partition is allowed."

Expected results:
Should be able to allow multiple swap LVs for kickstart profile

Additional info:
There was a similar restriction on physical partitions, fixed in https://bugzilla.redhat.com/show_bug.cgi?id=203490 . This restriction should be lifted for LVM swap as well. Compare the relevant code in KickstartPartitionCommand.java for handleLogVols and handlePartitions:

***
    private void handleLogVols(String keyIn, String logvolIn) throws ParseException {
       if (logvols.containsKey(keyIn)) {
           throw new ParseException(keyIn, 0);
       }
       logvols.put(keyIn, logvolIn);

   private void handlePartitions(String keyIn, String partIn) throws ParseException {
       // we can have multiple swaps...follow perl pattern of storing swap, swap1..swapN

       if (keyIn.startsWith(SWAP)) {
           if (partSwaps > 0) {
               partIn.replaceFirst(SWAP, SWAP + partSwaps);
               keyIn = SWAP + partSwaps;
           }
           partSwaps++;
       }
       else if (partitions.containsKey(keyIn)) {
           throw new ParseException(keyIn, 0);
       }        
       partitions.put(keyIn, partIn);

***

Note that entering the swap LV's like this allows the user to avoid the error message:

logvol swap2 --fstype swap --name=swap2 --vgname=myvg --size=1984
logvol swap1 --fstype swap --name=swap1 --vgname=myvg --size=1984

(changing all "logvol swap" to "logvol swapN"). When you click "Update Partitions", the N gets stripped out, and the kickstart profile gets updated without error.

Comment 1 Xixi 2010-08-27 21:57:17 UTC
Created attachment 441620 [details]
proposed patch

Comment 4 Partha Aji 2010-08-31 21:04:33 UTC
Should be resolved as of http://git.fedorahosted.org/git/?p=spacewalk.git;a=commit;h=29e66d7da550556ef8de7e3be77e8f563d263d9a
The rpm that has the fix should be spacewalk-java-1.2.20-1 or higher version.

Comment 7 Milan Zázrivec 2010-10-26 11:42:44 UTC
Verified in stage w/ spacewalk-java-1.2.39-29.el5sat (-> release_pending).

Comment 8 Clifford Perry 2010-10-28 14:50:57 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford


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