If the registry secret exists in the service parameters but doesn't
exist in the OpenStack secret list, the current update script will
throw out an error. This commit skips the secret deletion operation if
the secret doesn't exists, allows creating a new secret and updating
it to the service parameters.
Test:
1. Bring up a DC(DX central cloud + SX subcloud) with this change.
2. Delete the ghcr registry secret manually, update the secrets again
with sysinv credentials in the subcloud.
3. Delete the ghcr registry secret manually, migrate the subcloud to
another central cloud.
Reviewed: https:/ /review. opendev. org/c/starlingx /utilities/ +/820575 /opendev. org/starlingx/ utilities/ commit/ f0addaecbd23ef2 e52b584be8a4db3 073b26d2b3
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit f0addaecbd23ef2 e52b584be8a4db3 073b26d2b3
Author: Yuxing Jiang <email address hidden>
Date: Mon Dec 6 09:58:00 2021 -0600
Skip the secret deletion if it doesn't exist
If the registry secret exists in the service parameters but doesn't
exist in the OpenStack secret list, the current update script will
throw out an error. This commit skips the secret deletion operation if
the secret doesn't exists, allows creating a new secret and updating
it to the service parameters.
Test:
1. Bring up a DC(DX central cloud + SX subcloud) with this change.
2. Delete the ghcr registry secret manually, update the secrets again
with sysinv credentials in the subcloud.
3. Delete the ghcr registry secret manually, migrate the subcloud to
another central cloud.
Closes-bug: 1953365 9d8a80eaa5ddeec 0a35a386014
Signed-off-by: Yuxing Jiang <email address hidden>
Change-Id: Id6afea988fa855