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.
Created attachment 441620 [details] proposed patch
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.
Verified in stage w/ spacewalk-java-1.2.39-29.el5sat (-> release_pending).
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