Skip to content

Commit 7d98067

Browse files
jovialAlex-Welshmnasiadka
authored
Fix growroot when using software raid (#818)
* Fix growroot when using software raid Using @markgoddard's suggestion from: #770 (comment) * Add a release note * Update releasenotes/notes/fixes-growroot-for-software-raid-3852bdea5415a0be.yaml Co-authored-by: Alex-Welsh <[email protected]> Co-authored-by: Michał Nasiadka <[email protected]>
1 parent 95fbf7a commit 7d98067

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

etc/kayobe/ansible/growroot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
vars:
7676
pv: "{{ pvs.stdout | from_json }}"
7777
disk_tmp: "{{ pv.report[0].pv[0].pv_name[:-1] }}"
78-
disk: "{{ disk_tmp[:-1] if disk_tmp[-1] == 'p' and disk_tmp[:9] == '/dev/nvme' else disk_tmp }}"
78+
disk: "{{ disk_tmp[:-1] if pv.report[0].pv[0].pv_name | regex_search('[a-z0-9]+[0-9]+p[0-9]+') else disk_tmp }}"
7979
part_num: "{{ pv.report[0].pv[0].pv_name[-1] }}"
8080
become: true
8181
failed_when: "growpart.rc != 0 and 'NOCHANGE' not in growpart.stdout"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes a regression when using ``growroot.yml`` and software raid where the
5+
playbook would fail to identify the correct disk.

0 commit comments

Comments
 (0)