3e7aefdb4d
For HDD/SSD and NVMe disks we provide 'by-path' values which correspond to physical locations residing within a specific host (i.e. controller pci slot location). For multipath devices we will use by-id/wwn values to uniquely identify a persistent disk which will have multiple devices that coalesce into a single multipath device. This change will match physical volumes provided to the module in both /dev/disk/by-path and /dev/disk/by-id/wwn-* patterns. This aligns with the hiera data generated from the system inventory Test Plan: PASS - AIO-SX: HPE multipath install/bootstrap/unlock PASS - AIO-SX: Qemu virtual multipath install/bootstrap/unlock PASS - AIO-DX: Qemu virtual multipath install/bootstrap/unlock PASS - AIO-DX+: Qemu virtual multipath install/bootstrap/unlock PASS - 2+2 (controller storage): Qemu virtual multipath install/ bootstrap/unlock PASS - 2+2+2 (dedicated storage): Qemu virtual multipath install/ bootstrap/unlock PASS - Add OSD ceph storage configuration (AIO-SX) PASS - Expand CGTS volume group using extra disk (Partition) (AIO-SX) PASS - Expand CGTS volume group using extra disk (disk) (AIO-SX) PASS - Add nova local volume group using extra disk (AIO-SX) PASS - App pod that alocates and writes into a PVC (AIO-SX) PASS - Local disk Commands (Disk API) - AIO-SX/DX - host-disk-list - host-disk-show - host-disk-partition-list - host-disk-partition-show - host-pv-list - host-pv-show - host-stor-list - host-stor-show - host-lvg-list - host-lvg-show - host-pv-add PASS - Create nova-local volume group PASS - Local disk Commands on AIO-DX after swact Regression: PASS - AIO-SX: Non-multipath install/bootstrap/unlock (NVME) PASS - AIO-DX: Non-multipath install/bootstrap/unlock (SSD) PASS - 2+2: Non-multipath install/bootstrap/unlock (SSD) PASS - 2+2+2 : Non-multipath install/bootstrap/unlock (SSD and HD) PASS - Distributed cloud: Non-multipath install/bootstrap/unlock Change-Id: I99cfa858ed6c1e410ceafd6ad7713ad7d6692baf Depends-On: https://review.opendev.org/c/starlingx/tools/+/860590 Story: 2010046 Task: 47200 Signed-off-by: Robert Church <robert.church@windriver.com>
22 lines
962 B
Diff
22 lines
962 B
Diff
From: Robert Church <robert.church@windriver.com>
|
|
Date: Wed, 1 Mar 2017 09:12:34 +0000
|
|
Subject: US94222: Persistent Dev Naming
|
|
|
|
---
|
|
lib/puppet/provider/volume_group/lvm.rb | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/puppet/provider/volume_group/lvm.rb b/lib/puppet/provider/volume_group/lvm.rb
|
|
index 4d6e426..a6d4a70 100644
|
|
--- a/lib/puppet/provider/volume_group/lvm.rb
|
|
+++ b/lib/puppet/provider/volume_group/lvm.rb
|
|
@@ -115,7 +115,7 @@ Puppet::Type.type(:volume_group).provide :lvm do
|
|
|
|
def physical_volumes
|
|
if @resource[:createonly].to_s == 'false' || !vgs(@resource[:name])
|
|
- lines = pvs('-o', 'pv_name,vg_name', '--separator', ',')
|
|
+ lines = `pvs -o pv_name,vg_name --separator ',' | awk -F ',' 'NR>1{cmd="find -L /dev/disk/by-path/ -samefile" $1; cmd | getline $1;print $1 "," $2; next};{print}'`
|
|
lines.split(%r{\n}).grep(%r{,#{@resource[:name]}$}).map do |s|
|
|
s.split(%r{,})[0].strip
|
|
end
|