Bug 854229 - swapsize requires partition element
swapsize requires partition element
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: lab controller (Show other bugs)
0.9
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 19.1
: ---
Assigned To: Dan Callaghan
tools-bugs
Kickstart
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-04 08:57 EDT by Raymond Mancy
Modified: 2014-12-17 19:24 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-12-17 03:40:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Raymond Mancy 2012-09-04 08:57:31 EDT
Description of problem:

the KS meta var 'swapsize' has no effect unless a <partition/> 
is specified

Version-Release number of selected component (if applicable):

0.9

How reproducible:

Always

Steps to Reproduce:
1.Insert swapsize as ks meta var
2.
3.
  
Actual results:

It's ignored unless you have also specified a partition

Expected results:

It should create the swap partition with the value from the swapsize variable

Additional info:

Perhaps we could just do this

diff --git a/Server/bkr/server/snippets/rhts_partitions b/Server/bkr/server/snippets/rhts_partitions
index 0d6d813..11f8fb9 100644
--- a/Server/bkr/server/snippets/rhts_partitions
+++ b/Server/bkr/server/snippets/rhts_partitions
@@ -8,7 +8,7 @@ clearpart --drives {{ ondisk }} --all --initlabel
 clearpart --all --initlabel
 {% endif %}
 
-{% if partitions or ondisk %}
+{% if partitions or ondisk or swapsize %}
 
 {#
 ## Arch Specific Boot requirements
Comment 1 Nick Coghlan 2012-10-17 00:35:54 EDT
Bulk reassignment of issues as Bill has moved to another team.
Comment 3 Dan Callaghan 2014-11-20 01:36:44 EST
http://gerrit.beaker-project.org/3497
Comment 4 Dan Callaghan 2014-11-25 00:47:53 EST
In testing this I discovered that swapsize does not actually do anything, I think because we are also passing --recommended at the same time so Anaconda ignores our requested size.
Comment 5 Dan Callaghan 2014-11-25 01:08:39 EST
Patch updated.

A better test case is probably:
1. Schedule a job that requests 10GB swap, on a system with >20GB disk:
<recipe ks_meta="swapsize=10240"...
<hostRequires>
  <disk><size op="gt;" size="20" units="GB"/></disk>
  ...
<reservesys/>
...
2. Wait for system to be reserved
3. Log in and check size of swap partition, using fdisk -l or free

Expected results:
Swap partition is 10GB.

# free
             total       used       free     shared    buffers     cached
Mem:        873556     399172     474384          0      20228     203272
-/+ buffers/cache:     175672     697884
Swap:     10485752          0   10485752
Comment 12 Dan Callaghan 2014-12-17 03:40:14 EST
Beaker 19.1 is released.

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