From cee44fc2fb42e2a44366a65bc50089809594ed3a Mon Sep 17 00:00:00 2001 From: Tee Ngo Date: Thu, 27 Apr 2023 20:13:13 -0400 Subject: [PATCH] Enhance software version check for backup delete As a result of commit https://review.opendev.org/c/starlingx/distcloud/+/879369 software version was passed in as a float as opposed to string format. This commit ensures the provided sofware version is always in string format. Test Plan: - Create a subcloud backup using dcmanager subcloud-backup create command. Verify that the subcloud backup can be deleted successfully using dcmanager subcloud-backup delete command. Closes-Bug: 2017947 Signed-off-by: Tee Ngo Change-Id: I9657bdc61dd53abf77905331da70ae6ec8c0d810 --- .../roles/subcloud-bnr/delete/tasks/validate_input.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbookconfig/src/playbooks/roles/subcloud-bnr/delete/tasks/validate_input.yml b/playbookconfig/src/playbooks/roles/subcloud-bnr/delete/tasks/validate_input.yml index e96e284d8..3f3b5998c 100644 --- a/playbookconfig/src/playbooks/roles/subcloud-bnr/delete/tasks/validate_input.yml +++ b/playbookconfig/src/playbooks/roles/subcloud-bnr/delete/tasks/validate_input.yml @@ -25,7 +25,7 @@ - name: Fail if the specified software version is invalid fail: msg: "Specified software_version is invalid. Supported version: {{ supported_release_versions_for_backup|join(', ') }}" - when: software_version not in supported_release_versions_for_backup + when: software_version|string not in supported_release_versions_for_backup - name: Fail if storage location is not specified for backup removal on system controller fail: