Update IgnitionJson to sort the list of file systems

- Closes #1433

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-09-27 18:15:15 -06:00
parent 617e1b9e5a
commit cdbabfc834
3 changed files with 46 additions and 8 deletions

View File

@@ -47,6 +47,9 @@ func (node *NodeInfo) GetStorage() (stor types_3_4.Storage, err error, rep strin
wwlog.Debug("created file system struct: %v", myFs)
fileSystems = append(fileSystems, myFs)
}
sort.SliceStable(fileSystems, func(i int, j int) bool {
return fileSystems[i].Device < fileSystems[j].Device
})
var disks []types_3_4.Disk
for diskDev, disk := range node.Disks {
var partitions []types_3_4.Partition