Skip to content

Commit

Permalink
Validate OSTree options on RHEL10
Browse files Browse the repository at this point in the history
This check seems to have been lost in the initial commit of this file.
Discovered while working on weldr-client tests running on RHEL10.

Related: RHEL-67056
  • Loading branch information
bcl committed Nov 11, 2024
1 parent 4897f61 commit a445542
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/distro/rhel/rhel10/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ func checkOptions(t *rhel.ImageType, bp *blueprint.Blueprint, options distro.Ima
// holds warnings (e.g. deprecation notices)
var warnings []string

if options.OSTree != nil {
if err := options.OSTree.Validate(); err != nil {
return nil, err
}
}

if slices.Contains(t.UnsupportedPartitioningModes, options.PartitioningMode) {
return warnings, fmt.Errorf("partitioning mode %q is not supported for %q", options.PartitioningMode, t.Name())
}
Expand Down

0 comments on commit a445542

Please sign in to comment.