Comment 3 for bug 2051268

Revision history for this message
Jadon Naas (jadonn) wrote :

In the test run for this bug, the test output shows that the file /tmp/timestamp was created successfully before the instance was shelved. Here is the relevant log output:

2024-01-24 18:07:23,371 139089 INFO [tempest.lib.common.ssh] ssh connection to ubuntu@10.246.182.105 successfully created
2024-01-24 18:07:23,372 139089 DEBUG [tempest.lib.common.utils.linux.remote_client] Remote command: set -eu -o pipefail; PATH=$PATH:/sbin:/usr/sbin; sudo sh -c "date > /tmp/timestamp; sync"
2024-01-24 18:07:23,372 139089 INFO [tempest.lib.common.ssh] Creating ssh connection to '10.246.182.105:22' as 'ubuntu' with public key authentication
2024-01-24 18:07:24,102 139089 INFO [tempest.lib.common.ssh] ssh connection to ubuntu@10.246.182.105 successfully created
2024-01-24 18:07:24,620 139089 DEBUG [tempest.lib.common.utils.linux.remote_client] Remote command: set -eu -o pipefail; PATH=$PATH:/sbin:/usr/sbin; sudo cat /tmp/timestamp
2024-01-24 18:07:24,621 139089 INFO [tempest.lib.common.ssh] Creating ssh connection to '10.246.182.105:22' as 'ubuntu' with public key authentication
2024-01-24 18:07:24,798 139089 INFO [tempest.lib.common.ssh] ssh connection to ubuntu@10.246.182.105 successfully created

It looks like when the server is shelved /tmp/ is being cleared out. I replicated this behavior manually using an OpenStack instance with the image at https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img. I made the timestamp, confirmed the file was created, shelved the instance, unshelved the instance, and the timestamp file was gone.

I did see that /tmp is located on the device for cloudimg-rootfs. I think that /tmp is getting cleared out because the cloudimg-rootfs is provisioned from the original image again when unshelving the instance.