Skip to content

Commit

Permalink
Merge pull request #4917 from shiftstack/BZ_1957809
Browse files Browse the repository at this point in the history
Bug 1957809: Validation of platform.openstack.machineSubnet
  • Loading branch information
openshift-merge-robot authored May 11, 2021
2 parents c018bd4 + 8abc715 commit f7170a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/asset/installconfig/openstack/validation/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ func validateMachinesSubnet(p *openstack.Platform, n *types.Networking, ci *Clou
if len(p.ExternalDNS) > 0 {
allErrs = append(allErrs, field.Invalid(fldPath.Child("externalDNS"), p.ExternalDNS, "externalDNS is set, externalDNS is not supported when machinesSubnet is set"))
}
if !validUUIDv4(p.MachinesSubnet) {
if ci.MachinesSubnet == nil {
allErrs = append(allErrs, field.NotFound(fldPath.Child("machinesSubnet"), p.MachinesSubnet))
} else if !validUUIDv4(p.MachinesSubnet) {
allErrs = append(allErrs, field.InternalError(fldPath.Child("machinesSubnet"), errors.New("invalid subnet ID")))
} else {
if n.MachineNetwork[0].CIDR.String() != ci.MachinesSubnet.CIDR {
Expand Down

0 comments on commit f7170a4

Please sign in to comment.