There is a previous change introduced to allow prestaging when N-1
release is provided as software version in N System Controller.
https://review.opendev.org/c/starlingx/ansible-playbooks/+/961843
With that change, the logic considers the Unavailable state when the
commit is empty in metadata file.
Currently, the command used to generate System Controller metadata
commits did not take 'empty' commit ID for certain N-1 release case into
consideration. As the result, the "ostree_metadata_commits_central" file
is repeatedly created by each Ansible instance in the batch as opposed
to being created once by the first Ansible instance. Thus, a large batch
of prestage tasks can exceed flock 180s timeout.
This commit resolves the issue.
Test Plan:
PASS - Bring up a System Controller with N release.
- Bring up multiple subclouds with N-1 release.
- Upload N-1 release in System Controller.
- Create and apply a prestage strategy for multiple subclouds
providing N-1 as software version.
- Verify that the subclouds are prestaged successfully.
Regression Test:
- Prestage a standalone subcloud with N-1 release.
- Prestage a standalone subcloud with N release.
- Create and apply a prestage strategy providing N release.
Closes-Bug: 2127217
Change-Id: I0aba653f72a8c56f4c0f1d73d7bdf0611d99cc93
Signed-off-by: Cristian Mondo <cristian.mondo@windriver.com>