From aec3a9ec40905f2fbf73ec9831a5daa85fe1ef74 Mon Sep 17 00:00:00 2001 From: Fernando Diaz Date: Fri, 11 Mar 2022 09:33:11 +0100 Subject: [PATCH] bnr - Fix bad UEFI working In the past, some code was introduced on the B&R automation to take some actions in case the UEFI nodes had a certain boot configuration. It was verified that the boot configuration was not related at all with how OpenStack manages UEFI, but it was an error on the physical installation of the OS. That code does nothing so it is cleaned up with this change. This change solves BZ/2020656 Change-Id: Ib9af92fbe9e4a7ed55291ebf7ed019129609daa6 (cherry picked from commit 1ad4396423fe59b4ce3bae7ca5e1e4217f02555c) --- .../backup_and_restore/defaults/main.yml | 6 ------ .../backup_and_restore/tasks/run_backup.yml | 19 ------------------- 2 files changed, 25 deletions(-) diff --git a/tripleo_ansible/roles/backup_and_restore/defaults/main.yml b/tripleo_ansible/roles/backup_and_restore/defaults/main.yml index e49ff4b82..ec014078c 100644 --- a/tripleo_ansible/roles/backup_and_restore/defaults/main.yml +++ b/tripleo_ansible/roles/backup_and_restore/defaults/main.yml @@ -125,12 +125,6 @@ tripleo_backup_and_restore_ceph_mon_role: "ceph_mon" # The cephadm path tripleo_backup_and_restore_cephadm_path: "/usr/sbin/cephadm" -# The partition (/dev/whatever) that contain the /boot and /boot/efi contents -# but that are not mounted. These variables should only contain the last part -# of the partition (the whatever), i.e: sda2, sda1, vda2, sdb3, sdc1... -tripleo_backup_and_restore_boot_mount: replaceme -tripleo_backup_and_restore_boot_efi_mount: replaceme - # The name of the node to restore tripleo_backup_and_restore_overcloud_restore_name: undercloud diff --git a/tripleo_ansible/roles/backup_and_restore/tasks/run_backup.yml b/tripleo_ansible/roles/backup_and_restore/tasks/run_backup.yml index cc97716fa..ebaa40daa 100644 --- a/tripleo_ansible/roles/backup_and_restore/tasks/run_backup.yml +++ b/tripleo_ansible/roles/backup_and_restore/tasks/run_backup.yml @@ -40,25 +40,6 @@ tags: - bar_create_recover_image -- name: Check if /boot/efi is mounted when the OS uses UEFI - set_fact: - boot_efi_mount: "{{ ansible_facts['mounts'] | selectattr('mount', 'equalto', '/boot/efi') | list | length > 0 }}" - when: efi_dir.stat.exists - tags: - - bar_create_recover_image - -- name: Manually mount /boot/efi if it is not mounted - shell: | - set -o pipefail - mkdir /boot/efi_stack - mount /dev/{{ tripleo_backup_and_restore_boot_efi_mount }} /boot/efi_stack - dd if=/dev/{{ tripleo_backup_and_restore_boot_mount }} of=/boot/{{ tripleo_backup_and_restore_boot_mount }} - when: - - efi_dir.stat.exists - - not boot_efi_mount - tags: - - bar_create_recover_image - - name: Tasks in case historical backups are activated block: - name: Get date and time to add to the backup prefix