Skip to content

Commit

Permalink
(bugfix): Lack of volume group should not produce error
Browse files Browse the repository at this point in the history
```
$ sudo /usr/local/sbin/ebs-bootstrap -mode prompt
πŸ”΅ Nitro NVMe detected: /dev/nvme10n1 -> /dev/sdk
πŸ”΅ Nitro NVMe detected: /dev/nvme0n1 -> /dev/sda1
πŸ”΅ Nitro NVMe detected: /dev/nvme2n1 -> /dev/sde
πŸ”΅ Nitro NVMe detected: /dev/nvme9n1 -> /dev/sdf
πŸ”΅ Nitro NVMe detected: /dev/nvme5n1 -> /dev/sdc
πŸ”΅ Nitro NVMe detected: /dev/nvme6n1 -> /dev/sdj
πŸ”΅ Nitro NVMe detected: /dev/nvme3n1 -> /dev/sdh
πŸ”΅ Nitro NVMe detected: /dev/nvme1n1 -> /dev/sdi
πŸ”΅ Nitro NVMe detected: /dev/nvme7n1 -> /dev/sdg
πŸ”΅ Nitro NVMe detected: /dev/nvme8n1 -> /dev/sdd
πŸ”΅ Nitro NVMe detected: /dev/nvme4n1 -> /dev/sdl
πŸ”΄ /dev/nvme6n1: Physical volume has no volume group
```
  • Loading branch information
lasith-kg authored May 24, 2024
1 parent 85c521d commit d3eda05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/backend/lvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (lb *LinuxLvmBackend) SearchVolumeGroup(physicalVolume string) (*model.Volu
}
vgn := lb.lvmGraph.GetChildren(pvn, model.VolumeGroupKind)
if len(vgn) == 0 {
return nil, fmt.Errorf("πŸ”΄ %s: Physical volume has no volume group", physicalVolume)
return nil, nil
}
return &model.VolumeGroup{
Name: vgn[0].Name,
Expand Down

0 comments on commit d3eda05

Please sign in to comment.