Commit Graph

23 Commits

Author SHA1 Message Date
Zuul b4f1559f0e Merge "Handle prestage partition create and cleanup when needed" 2021-11-16 15:37:44 +00:00
David Sullivan c8cc7064ff Update platform-backup to use 30GB partition
In order to support local installation, the platform-backup partition
needs to be large enough to support the install files.

The new recommended size is 30GB based on the following criteria:
ISO image (2.5GB)
5 patches (2.5GB) - 500M per patch
Compressed image archive (5G) - archive is currently 14G uncompressed
Platform Backup (10G) - current size

This change also includes an option to pass the partition size in the
boot parameters.

Test Plan:
AIO install with 240GB disk
AIO install with 500GB disk
AIO install with custom partition size
AIO install with smaller custom partition size
Standard install

AIO-DX upgrade from 21.05

Story: 2008966
Task: 43981
Depends-On: https://review.opendev.org/c/starlingx/config/+/817967
Signed-off-by: David Sullivan <david.sullivan@windriver.com>
Change-Id: Ie8c6def2382dad38371dd280fa304ebbc839b675
2021-11-15 10:06:18 -06:00
Eric MacDonald e4d4fec506 Handle prestage partition create and cleanup when needed
This update ensures the 'Platform Backup' partition label
is assigned to a newly created partition so that it gets
mounted properly.

This update cleans the prestage directory prior to new
prestaging.

Test Plan:

PASS: Verify prestaging partition create if missing
PASS: Verify prestaging cleanup before staging new files
PASS: Verify prestaged failure handling with small disk.
PASS: Verify prestaging image install and login.
PASS: Verify back to back prestaging installs
PASS: Verify reboot recovery after prestaging install

Story: 2009291
Task: 43825
Change-Id: I8f51b9d91ba7fd32e722a37f8336397959ba6ed6
Depends-On: https://review.opendev.org/c/starlingx/metal/+/817779
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2021-11-12 13:59:04 -05:00
Zuul 9f861eaaa5 Merge "Revert "Align partitions created by kickstarters"" 2021-05-13 16:25:57 +00:00
Eric MacDonald 5942a56ec6 Revert "Align partitions created by kickstarters"
This reverts commit 0e89acc83c.

Reason for revert: Review should have been abandoned rather than merged.

Change-Id: I95f1e151183f122d93b834ab2a785736e5a8ef12
Closes-Bug: 1928341
2021-05-13 16:01:45 +00:00
Zuul e5ba65e643 Merge "Align partitions created by kickstarters" 2021-05-12 13:38:51 +00:00
Angie Wang 5619e3e8b6 Increase cgts-vg size for dc-vault fs
Increase the partition size for cgts-vg to include
dc-vault fs(15G) on AIO.

Tested installation of AIO-DX and AIO-DX DCSC

Partial-bug: 1916797
Change-Id: I00427820f710946275f99970ad9a7c1d8437955c
Signed-off-by: Angie Wang <angie.wang@windriver.com>
2021-02-24 15:25:49 -05:00
Angie Wang c7e18ca9e9 Correct the preserved cgts-vg size in AIO kickstart
Filesystems gnocchi and anchor were obsolete. Remove them
from the calculation of the minimum cgts-vg size. Correct
some other filesystem sizes like backup and pgsql.

We should preserve the PV size that fits the minimum
requirement to allow users to partition as they need.

Tested on both hardware labs and vbox.

Change-Id: I80d0765e3c6719e71a0647cab15630077ab42067
Partial-Bug: 1892554
Signed-off-by: Angie Wang <angie.wang@windriver.com>
2020-09-10 16:48:26 +00:00
Daniel Safta 0e89acc83c Align partitions created by kickstarters
Partitions on some disks may be created unaligned.

The cause is that the creation of partitions is done between
specific intervals expressed in MBs. The kernel exposed a
specific variable for each disk for providing an offset to
align each partitions (/sys/block/<disk>/alignment_offset).

For better granular control, we transform MB units into
logical sector units and use the alignment_offset variable
to properly align the partitions.

Change-Id: I971c232fe0969eac14b85c5796908f0c85e23dbf
Closes-bug: 1883975
Signed-off-by: Daniel Safta <daniel.safta@windriver.com>
2020-09-07 07:41:49 +00:00
Angie Wang ffa7eb1b6f Enable StarlingX in QEMU/KVM VM with small disk
AIO disk kickstart is updated to reduce the sizes of some partitions and
logical volumes to support StarlingX running in Openstack Nova VM (QEMU/KVM
environment) with a tiny root disk size from 60GB to 154GB

The sizes of partitions and preserved logical volumes are:
/  15GB
/boot  0.5GB
/opt/platform-backup  1GB
cgts-vg  43GiB
  - scratch-lv 2GiB
  - log-lv 3GiB
  - rabbit-lv 2GiB
  - extension-lv 1GiB
  - kubelet-lv 2GiB
  - docker-lv 20GiB
  - dockerdistribution-lv 8GiB
  - etcd-lv 1GiB
  - platform-lv 1GiB
  - pgsql-lv 1*2GiB
  - backup-lv 1GiB

With this filesystems setting, backup&restore and stx-openstack are not
supported in StarlingX in Nova VM.

Note: only AIO system is supported to run StarlingX in Openstack VM for now.

Change-Id: I02b073e49a32bf94f0ac4ce2d6b1095398f3fd11
Story: 2007858
Task: 40721
Signed-off-by: Angie Wang <angie.wang@windriver.com>
2020-08-26 10:11:08 -04:00
Ovidiu Poncea 9b5148e3b5 Harden kickstarts as udev behavior can lead to random failures
Whenever a dev node that is not in use is opened with open(O_RDWR)
udev triggers a flush in devtmpfs that briefly remove & recreate all
the nodes for partitions on that device. This leads to commands
accessing dev nodes during the flush to fail. In our case blkid and
lsblk failed.

These failures are hard to reproduce, have devastating effect on
the partitioning operations and are not solved by using 'udevadm settle'
as some of the kernel events are asynchronous.

So, mainly, this commit stops udev from messing up with /dev nodes by
initializing file descriptors for all storage devices then opening
locks on them with flock. Setting locks stops udev triggering kernel
partition rescan.

Locks are set at the start of the partitioning operation and
released at the end.

For more details and similar cases see:
 o 02ba8fb335
 o http://tracker.ceph.com/issues/14080
 o http://tracker.ceph.com/issues/15176

This commit:
 o stops udev messing up with /dev nodes;
 o aborts install on critical failures;
 o adds retry for critical operations such as LVM cleanup or
   partition removal and creation.

Closes-Bug: 1888938
Change-Id: Iaaaaaae973ee36f2c4bfd42c327e8c6278d59303
Signed-off-by: Ovidiu Poncea <ovidiu.poncea@windriver.com>
2020-07-28 16:14:28 +00:00
Don Penney f8c508ca06 Resize /scratch to 16G in controller kickstarts
Update controller kickstarts to create /scratch as a 16G volume on
installation.

Change-Id: I68a0a67642887373924eea13a1074db753185734
Partial-Bug: 1885168
Signed-off-by: Don Penney <don.penney@windriver.com>
2020-06-25 14:15:30 -04:00
Mihnea Saracin 7d4d3c78be Persistent backup partition resizing
The persistent backup partition will be resized if
it's detected to be smaller than it should be.

Story: 2007403
Task: 39548
Change-Id: I6809a7c3a8363c8ee7f26bc9c8d61ed97451d29d
Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
2020-05-14 14:05:05 +03:00
Mihnea Saracin ece0dd0ce5 Persistent backup partition
Add a backup partition that has
the following characteristics:
- It will never be deleted
  (not at install, reinstall, upgrade nor B&R)
- The partition will have 10G
- It will be resizable at upgrades

Story: 2007403
Task: 39548
Change-Id: I2ec9f70d00a38568fc00063cdaa54ec3be48dc47
Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
2020-04-29 14:46:01 +03:00
Kristine Bujold 3aea82253e Increase cgts-vg size to accommodate new kubelet fs
A new filesystem called "kubelet" is being added to all nodes with a
default size of 10G. This commit increases the cgts-vg size to
accommodate new kubelet fs on worker nodes.

Tested with install of hardware Standard and AIO-DX labs. Also
tested install of a vbox AIO-SX lab.

Partial-Bug: 1830142

Change-Id: I124a977e4c7ea9239a2d7cb04d0d42c4093bf4bb
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2019-07-17 10:14:39 -04:00
Wei Zhou fe397d5d27 Automatically create cgts-vg volume group on worker nodes
This commit creates cgts-vg volume group automatically on worker
nodes by kickstart. This cgts-vg volume group reserves space for
log-lv, scratch-lv, docker-lv and ceph-mon-lv.

This commit reserves space in cgts-vg volume group for 30G
docker-lv and 20G ceph-mon-lv for AIO configuration.

Story: 2004520
Task: 28663
Change-Id: Ic77d00c354da1070e2c4c2da4545d70ab4a93d91
Signed-off-by: Wei Zhou <wei.zhou@windriver.com>
2019-01-07 22:03:03 -05:00
Angie Wang 45da23bbce Increase the partition size for docker distribution
This increases the default docker distribution partition size from
1G to 16G. This also increases the minimum disk requirements from
130G to 145G for small disk, 170G to 185G for large disk.

Story: 2004520
Task: 28526
Change-Id: I898cfac45757ff1f9e6ce7c4928bbd9a42dca77d
Signed-off-by: Angie Wang <angie.wang@windriver.com>
2018-12-18 20:52:12 -05:00
Al Bailey 73edb1fdf1 Increase disk size requirement from 10G to 16G for docker
Base disk increases by 6G from 124G to 130G for
small disk and from 164 to 170 for large.

Story: 2002876
Task: 27948
Change-Id: I3d987c0d70bf18a91cb4c977ac16fcdabe2cb9fc
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2018-11-16 12:05:25 -06:00
Robert Church ded5907f5b Update minimal PV size to include k8s LVs
Make sure the minimally sized physical volume for the cgts-vg volume
group is sized correctly when the --kubernetes option is used with
config_controller. Include the kubernetes specific logical volumes that
will be present in a kubernetes configuration.

Change-Id: Ifc6d2c0a5dbb880f8e1ff73b01bc05cb8ab22855
Partial-Bug: #1794567
Signed-off-by: Robert Church <robert.church@windriver.com>
2018-10-03 14:11:21 -04:00
Stefan Dinescu bea3956ee9 Change backup partition size for small disks
Minimum backup partition size is calculated as the sum between the
sizes of the glance and database partitions, as well as a 20GB
overhead.

This fix increase the default backup size partition to 40GB to
be in line with the above calculations, considering the database
and the glance partitions are 10GB each by default.

This also increases the minimum disk requirements from 120GB
to 130GB.

Change-Id: I5cfc329870a84a6245d868b4c4990829e702e886
Closes-bug: 1793543
Signed-off-by: Stefan Dinescu <stefan.dinescu@windriver.com>
2018-09-24 15:34:37 +03:00
Stefan Dinescu 103cccd786 Simplify disk space allocation
Allocating of space on the root disk was done in kickstart, combined
with config_controller. Various checks for disk and volume group
space made it difficult to add new filesystem partitions.

To simplify this, all checks are now merged under disk size checks.

Kickstart files now create the partitions of the same size for
rootfs and log partitions, no matter the disk size, with the
only variable size being the cgts-vg size.

Thus, any future changes will only need to consider only this
size for ensuring enough space is present.

The limit between small and big disks is 240GB, with a minimum
disk size of 120GB.

Depends-On: https://review.openstack.org/#/c/600743/
Change-Id: I37ecc8eb5468811d1ca3a71f8e2a0629525e8fad
Closes-bug: 1791170
Signed-off-by: Stefan Dinescu <stefan.dinescu@windriver.com>
2018-09-12 10:12:56 +03:00
Angie Wang b2d963f0ef Extend cgcs disk partition for gnocchi usage
Updating kickstart to provision 5G for new gnocchi filesystem in
cgcs disk partition.

Story: 2002825
Task: 24240

Change-Id: Ie6182a636e6b9c580af2cce671dcbb267acb305f
Signed-off-by: Angie Wang <angie.wang@windriver.com>
2018-08-08 15:54:44 -04:00
Dean Troyer 18922761a6 StarlingX open source release updates
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-05-31 07:36:43 -07:00