Create swap after dealing with data volumes

It is possible for our data volume to be attached to a node at a dev
location that we also check for creating swap. However, when we are
attaching a data volume we know we want that volume mounted at the mount
point and not additional swap. Adjust the script to setup the data
volume first then when the make_swap.sh script runs it will see there is
already a filesystem on the device and skip over it.

Change-Id: I1e5527f74da3fdaada1b3b9961f8a9fbedc63341
This commit is contained in:
Clark Boylan 2025-04-08 12:57:41 -07:00
parent 777ace85af
commit 880a26f1ac

View File

@ -160,16 +160,16 @@ def bootstrap_server(server, key, name, volume_device, keep,
ssh_client.ssh('ping6 -c5 -Q 0x10 review.openstack.org '
'|| ping6 -c5 -Q 0x10 wiki.openstack.org')
ssh_client.scp(os.path.join(SCRIPT_DIR, 'make_swap.sh'),
'make_swap.sh')
ssh_client.ssh('bash -x make_swap.sh')
if volume_device:
ssh_client.scp(os.path.join(SCRIPT_DIR, 'mount_volume.sh'),
'mount_volume.sh')
ssh_client.ssh('bash -x mount_volume.sh %s %s %s' %
(volume_device, mount_path, fs_label))
ssh_client.scp(os.path.join(SCRIPT_DIR, 'make_swap.sh'),
'make_swap.sh')
ssh_client.ssh('bash -x make_swap.sh')
# Zero the ansible inventory cache so that next run finds the new server
inventory_cache_dir = '/var/cache/ansible/inventory'
try: