Bug 1322899 - Heat does not Swapon swap partition
Summary: Heat does not Swapon swap partition
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: 11.0 (Ocata)
Assignee: Jiri Stransky
QA Contact: Arik Chernetsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-31 15:04 UTC by Andreas Karis
Modified: 2017-07-17 21:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-17 21:32:30 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Andreas Karis 2016-03-31 15:04:28 UTC
Description of problem:
When creating a flavor with swap, ironic/nova will create the partition, but our templates won't swap it on

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

How reproducible:
all of the tiime

Steps to Reproduce:
1. configure flavors with 2GB of swap
2. deploy
3. verify partitions, verify swap, verify /etc/fstab

Actual results:


Expected results:


Additional info:

[stack@undercloud ~]$ nova flavor-list
+--------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+
| ID                                   | Name          | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+--------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+
| 025370b4-cbf5-4858-8f17-6d9c5f0db90f | control       | 6144      | 23   | 0         | 2048 | 4     | 1.0         | True      |
| 02f93d99-af2b-41b7-9e96-563c2e1187fb | block-storage | 6144      | 23   | 0         | 2048 | 4     | 1.0         | True      |
| 4ce774c9-2b95-4715-8fa6-a5ef40c21df3 | swift-storage | 6144      | 23   | 0         | 2048 | 4     | 1.0         | True      |
| 8bfab431-af9c-4960-a669-9228ace7c5ba | ceph-storage  | 6144      | 23   | 0         | 2048 | 4     | 1.0         | True      |
| dad803e0-60b2-437f-883f-c41b040e3c93 | compute       | 6144      | 23   | 0         | 2048 | 4     | 1.0         | True      |
| f02dd370-a5a3-47de-840f-935643124033 | baremetal     | 4096      | 23   | 0         | 2048 | 1     | 1.0         | True      |
+--------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+



[root@overcloud-controller-0 ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:           7823        3225        3721          55         876        4268
Swap:             0           0           0
[root@overcloud-controller-0 ~]# fdisk -l

Disk /dev/vda: 64.4 GB, 64424509440 bytes, 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00033a7f

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1            2048     4196351     2097152   82  Linux swap / Solaris
/dev/vda2         4196352     4198399        1024   83  Linux
/dev/vda3   *     4198400   125828639    60815120   83  Linux
[root@overcloud-controller-0 ~]# swapon /dev/vda1
[root@overcloud-controller-0 ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:           7823        3246        3699          55         876        4246
Swap:          2047           0        2047


[stack@undercloud ~]$ ssh heat-admin.2.18
Last login: Thu Mar 31 14:59:44 2016 from 192.0.2.1
[heat-admin@overcloud-controller-0 ~]$ cat /etc/fstab 

#
# /etc/fstab
# Created by anaconda on Tue Feb 16 21:02:27 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
LABEL=img-rootfs /                       xfs     defaults        0 0

Comment 2 Mike Burns 2016-04-07 21:36:02 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 3 Jaromir Coufal 2016-10-10 03:40:39 UTC
Steve, can you help with triaging this one?

Comment 4 Steve Baker 2016-10-10 04:38:58 UTC
OSP 8.0 tripleo-heat-templates has extraconfig/all_nodes/swap-partition.yaml and extraconfig/all_nodes/swap.yaml which looks like can be used to configure the swap which the flavor defines.

I haven't checked but I'd expect some product documentation to show how to use this extra config. I've set the bug to target 8.0 since it looks like its fixed there, and setting needinfo on slagle to confirm.

Comment 5 James Slagle 2016-10-12 13:53:23 UTC
those environments were added for CI. they could possibly be used for production deployments, but I don't think it's recommended, hence why there is no documentation.

Comment 7 Alex Schultz 2017-07-17 21:32:30 UTC
I know we fixed the environments/enable-swap.yaml and environments/enable-swap-partition.yaml in THT as part of OSP11 GA and so the latest version should properly configure and enable swap.  This has also been backported to OSP10 as part of a rhbz#1415103


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