From 880a26f1ac7a6d20a35394062c88e1a5a11d6605 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 8 Apr 2025 12:57:41 -0700 Subject: [PATCH] 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 --- launch/src/opendev_launch/launch_node.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/launch/src/opendev_launch/launch_node.py b/launch/src/opendev_launch/launch_node.py index 630a94f456..b4f40d9db7 100755 --- a/launch/src/opendev_launch/launch_node.py +++ b/launch/src/opendev_launch/launch_node.py @@ -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: