Bug 1259539 - [ospd] No Swap Space allocated
Summary: [ospd] No Swap Space allocated
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 7.0 (Kilo)
Hardware: All
OS: Linux
high
high
Target Milestone: ga
: 10.0 (Newton)
Assignee: Marios Andreou
QA Contact: Shai Revivo
URL:
Whiteboard:
Depends On: 1245714
Blocks: 1425164
TreeView+ depends on / blocked
 
Reported: 2015-09-03 00:36 UTC by Mike Burns
Modified: 2023-02-22 23:02 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1245714
: 1425164 (view as bug list)
Environment:
Last Closed: 2016-10-05 19:08:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1491335 0 None None None Never
OpenStack gerrit 217796 0 None ABANDONED WIP Simple firstboot script that enables (if any) swap partition 2020-09-11 08:33:29 UTC
OpenStack gerrit 273752 0 None MERGED Support adding a swap file to overcloud nodes 2020-09-11 08:33:29 UTC
Red Hat Knowledge Base (Solution) 2148341 0 None None None 2016-02-03 11:57:20 UTC

Comment 2 Marios Andreou 2015-09-14 08:02:37 UTC
To get swap space in an instance you need to use Flavors that have swap space defined. I just confirmed that our current UI Flavours page doesn't have a swap space field so this needs to be added. Similarly the docs that show cli flavor creation should be ammended to add --swap. 

We already have individual flavor allocation per node type with --type-flavor params for each node type like --control-flavor --compute-flavor etc in the cli and these are mapped to tripleo heat template parameters like

./overcloud-without-mergepy.yaml:  OvercloudControlFlavor:
./overcloud-without-mergepy.yaml:  OvercloudComputeFlavor:
./overcloud-without-mergepy.yaml:  OvercloudBlockStorageFlavor:
./overcloud-without-mergepy.yaml:  OvercloudSwiftStorageFlavor:
./overcloud-without-mergepy.yaml:  OvercloudCephStorageFlavor:

To reiterate, we always need to use a flavor with a defined swap space and otherwise cannot launch an instance (an overcloud node in this case) with a swap space.  Thus I think we need two changes to accommodate this, UI and docs.

A slight complication here, is the fact that though the swap space on deployed nodes is created ok with this method, it is not enabled, as discussed at (upstream) https://bugs.launchpad.net/tripleo/+bug/1491335 - the workaround is a simple first boot script to enable it like at https://review.openstack.org/#/c/217796/1/firstboot/enable_swap.yaml - we either make this standard (land into downstream tht) until the bug is fixed, or we just document this workaround - we already have a section in the docs about defining firstboot scripts like https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/chap-Creating_Custom_Configuration.html#sect-Configuring_on_First_Boot

Comment 8 Marios Andreou 2016-03-17 14:49:05 UTC
The review by slagle at https://review.openstack.org/#/c/273752 "Support adding a swap file to overcloud nodes" uses the AllNodesExtraConfig interface to deliver a SoftwareConfig to run on all nodes before the puppet config is applied. This SoftwareConfig creates a 4096MB swap file at /swap (location and size are parameterized). 

To use this a deployer would have to override the default AllNodesExtraConfig and make it point to the extraconfig/all_nodes/swap.yaml - i.e.

  OS::TripleO::AllNodesExtraConfig: extraconfig/all_nodes/swap.yaml
  
in the resource registry. In the event that the AllNodesExtraConfig is already being used by the deployer (some of the partner integrations have made use of this interface) they can just include the SwapCOnfig and ControllerSwapDeployments for each node type from the swap.yaml into their own extraconfig file. 

The fix is also landed in stable/liberty upstream so should be available (possibly already is) in any new openstack-tripleo-heat-template builds

Comment 9 Mike McCune 2016-03-28 23:00:31 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 10 Mike Burns 2016-04-07 20:50:54 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 12 Jaromir Coufal 2016-10-05 19:08:47 UTC
Should be already in since OSP 8.


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