The incorrect path was being used for comparing the inodes
of the target and source mount paths, which results in incorrectly
detected stale mounts, followed by a failure to properly clean up the
mount.
Test Plan:
PASS:
- Unmount (but do not delete) the /var/www/pages/iso/<rel>/ostree_repo
directory. When a subcloud add or deploy operation is done, the bind
mount is recreated.
- Stale mount:
# Replace the original
sudo cp -a /var/www/pages/feed/rel-24.09/ostree_repo \ /var/www/pages/feed/rel-24.09/ostree_repo.orig
sudo rm -rf /var/www/pages/feed/rel-24.09/ostree_repo
sudo cp -a /var/www/pages/feed/rel-24.09/ostree_repo.orig \ /var/www/pages/feed/rel-24.09/ostree_repo
When a subcloud add or deploy operation is done, the stale bind
mount is detected. The /var/www/pages/iso/24.09/ostree_repo is
unmounted, and the directory is removed.
When a subcloud add or deploy operation is done, the bind
mount is recreated.
Reviewed: https:/ /review. opendev. org/c/starlingx /distcloud/ +/921316 /opendev. org/starlingx/ distcloud/ commit/ 42b72fd08a03f5b d03def0e2d8c310 7b3a82ef65
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 42b72fd08a03f5b d03def0e2d8c310 7b3a82ef65
Author: Kyle MacLeod <email address hidden>
Date: Tue Jun 4 13:49:02 2024 -0400
Fix incorect stale ostree_repo mount check
This commit fixes a regression introduced in /review. opendev. org/c/starlingx /distcloud/ +/920194
https:/
The incorrect path was being used for comparing the inodes
of the target and source mount paths, which results in incorrectly
detected stale mounts, followed by a failure to properly clean up the
mount.
Test Plan: pages/iso/ <rel>/ostree_ repo pages/feed/ rel-24. 09/ostree_ repo \
/var/ www/pages/ feed/rel- 24.09/ostree_ repo.orig pages/feed/ rel-24. 09/ostree_ repo pages/feed/ rel-24. 09/ostree_ repo.orig \
/var/ www/pages/ feed/rel- 24.09/ostree_ repo pages/iso/ 24.09/ostree_ repo is
PASS:
- Unmount (but do not delete) the /var/www/
directory. When a subcloud add or deploy operation is done, the bind
mount is recreated.
- Stale mount:
# Replace the original
sudo cp -a /var/www/
sudo rm -rf /var/www/
sudo cp -a /var/www/
When a subcloud add or deploy operation is done, the stale bind
mount is detected. The /var/www/
unmounted, and the directory is removed.
When a subcloud add or deploy operation is done, the bind
mount is recreated.
Closes-Bug: 2066411
Change-Id: I14332ef008f781 f742c69fcb39870 37e871ba19d
Signed-off-by: Kyle MacLeod <email address hidden>