Fix restore on DX failing due DRBD puppet

The restore action fails due lack of formatation on
partition drbd9.

This error was caused by the variable restore_extra_items.
When the variable is empty a bunch of unwanted extra backup
data will be unpacked, including the flag node_ceph_configured,
preventing the formatting of the drbd9 (ceph-mon partition)

Test plan:
  - PASS: Test B&R on a AIO-DX successfully
  - PASS: Test a restore with the "-e '{"restore_extra_items":
        ["etc/platform/.node_ceph_configured"]}'" parameter
	and check if the error persists, ensuring the
	functionality of this parameter.

Closes-Bug: 2083606

Change-Id: I9a9582635a1a04c4584dc4aebe94272ff45275c1
Signed-off-by: Caio Correa <caio.correa@windriver.com>
This commit is contained in:
Caio Correa 2024-10-03 08:42:29 -03:00 committed by Caio
parent e281cf7e3c
commit 0a7887fcb3

View File

@ -380,6 +380,7 @@
{{ ' '.join(restore_extra_items) }}
args:
warn: false
when: restore_extra_items | length > 0
- name: Look for the flag indicating that ceph is configured
shell: "tar -tf {{ restore_data_file }} | grep '{{ archive_ceph_backend_flag }}'"