From 523ca7bcb2e76a314c66c259a43276885dd8b404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20de=20Ara=C3=BAjo=20Cabral?= Date: Tue, 9 Apr 2024 08:46:08 -0300 Subject: [PATCH] Fix for snapshot-controller failure during restore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The change made in review [1] introduced the creation of the snapshot resources in all installations during the bootstrap. An issue was identified during the restore process (uses bootstrap playbook) in a specific scenario: systems with more than one host where the volume snapshot controller pod was not running on controller-0 when the backup was performed. During the restore process, within the snapshot-controller role, it checks if the snapshot-controller pod is running, resulting in a failure in the above scenario, since the assigned node will not be ready, as only controller-0 is ready to run pods during restore. Therefore, the fix involves skipping the execution of the role during restore. It's important to note that if the snapshot-controller pod was created before the backup, it will later be restored and will operate correctly after completing the restore process regardless of the node that was attached. [1]: https://review.opendev.org/c/starlingx/ansible-playbooks/+/904360 Test Plan: PASS: Successful backup and restore on an AIO-DX whose snapshot-controller pod was running on controller-0 during backup PASS: Successful backup and restore on an AIO-DX whose snapshot-controller pod was running on controller-1 during backup PASS: Successful backup and restore on a Standard (2+1) whose snapshot-controller pod was running on controller-1 during backup PASS: AIO-SX | AIO-DX fresh install + Check if the CRDs and snapshot-controller were created during bootstrap Closes-bug: 2060675 Change-Id: Ia2f69fafba4854236ea2d6c26932e99e63059ff8 Signed-off-by: Gabriel de Araújo Cabral --- .../roles/bootstrap/bringup-essential-services/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbookconfig/src/playbooks/roles/bootstrap/bringup-essential-services/tasks/main.yml b/playbookconfig/src/playbooks/roles/bootstrap/bringup-essential-services/tasks/main.yml index b5a0b1af2..731fd5194 100644 --- a/playbookconfig/src/playbooks/roles/bootstrap/bringup-essential-services/tasks/main.yml +++ b/playbookconfig/src/playbooks/roles/bootstrap/bringup-essential-services/tasks/main.yml @@ -1,6 +1,6 @@ --- # -# Copyright (c) 2019-2023 Wind River Systems, Inc. +# Copyright (c) 2019-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -284,7 +284,7 @@ - name: Enable volume snapshot support include_role: name: k8s-storage-backends/snapshot-controller - when: enable_volume_snapshot_support|bool + when: enable_volume_snapshot_support|bool and mode != 'restore' - name: Configure k8s-coredump-handler block: