Skip to content

Commit

Permalink
Allowing regex to allow rocky linux 9.3 onboarding (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
srinivaschavan authored Aug 27, 2024
1 parent 7c7eded commit 963fbd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/platform/centos/centos.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (c *CentOS) checkOSPackages() (bool, error) {
zap.S().Debug("Checking OS Packages")

rhel8, _ = regexp.MatchString(`.*8\.[5-9]\.*`, string(version))
rocky9, _ = regexp.MatchString(`.*9\.[1-2,4]\.*`, string(version))
rocky9, _ = regexp.MatchString(`.*9\.[1-4]\.*`, string(version))

if platform.SkipOSChecks {
rhel8, _ = regexp.MatchString(`8\.\d{1,2}`, string(version))
Expand Down Expand Up @@ -379,7 +379,7 @@ func (c *CentOS) Version() (string, error) {
return "redhat", nil
}
}
if match, _ := regexp.MatchString(`.*7\.[3-9]\.*|.*8\.[5-9]\.*|.*9\.[1-2,4]\.*`, string(version)); match {
if match, _ := regexp.MatchString(`.*7\.[3-9]\.*|.*8\.[5-9]\.*|.*9\.[1-4]\.*`, string(version)); match {
return "redhat", nil
}
return "", fmt.Errorf("Unable to determine OS type: %s", string(version))
Expand Down
2 changes: 1 addition & 1 deletion pkg/pmk/checkNode.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func CheckNode(ctx objects.Config, allClients client.Client, auth keystone.Keyst
case "redhat":
platform = centos.NewCentOS(allClients.Executor)
default:
return RequiredFail, fmt.Errorf("This OS is not supported. Supported operating systems are: Ubuntu (18.04, 20.04, 22.04), CentOS 7.[3-9], RHEL 7.[3-9] & RHEL 8.[5-9] & Rocky 9.[1-2,4]")
return RequiredFail, fmt.Errorf("This OS is not supported. Supported operating systems are: Ubuntu (18.04, 20.04, 22.04), CentOS 7.[3-9], RHEL 7.[3-9] & RHEL 8.[5-9] & Rocky 9.[1-4]")
}

if err = allClients.Segment.SendEvent("Starting CheckNode", auth, checkPass, ""); err != nil {
Expand Down

0 comments on commit 963fbd3

Please sign in to comment.