From dcc5f9866236cadc5791ce5394d4c7ab516c4f4c Mon Sep 17 00:00:00 2001 From: bharath Date: Wed, 8 Jan 2025 17:36:42 +0530 Subject: [PATCH] Add OS support for RHEL8.10 and Rocky9.5 --- pkg/platform/centos/centos.go | 8 ++++---- pkg/pmk/checkNode.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/platform/centos/centos.go b/pkg/platform/centos/centos.go index 9a6009d..fc817d0 100644 --- a/pkg/platform/centos/centos.go +++ b/pkg/platform/centos/centos.go @@ -135,8 +135,8 @@ func (c *CentOS) checkOSPackages() (bool, error) { errLines := []string{packageInstallError} zap.S().Debug("Checking OS Packages") - rhel8, _ = regexp.MatchString(`.*8\.[5-9]\.*`, string(version)) - rocky9, _ = regexp.MatchString(`.*9\.[1-4]\.*`, string(version)) + rhel8, _ = regexp.MatchString(`.*8\.[5-10]\.*`, string(version)) + rocky9, _ = regexp.MatchString(`.*9\.[1-5]\.*`, string(version)) if platform.SkipOSChecks { rhel8, _ = regexp.MatchString(`8\.\d{1,2}`, string(version)) @@ -181,7 +181,7 @@ func (c *CentOS) checkEnabledRepos() (bool, error) { var centos, rhel8 bool centos, _ = regexp.MatchString(`.*7\.[3-9]\.*`, string(version)) - rhel8, _ = regexp.MatchString(`.*8\.[5-9]\.*`, string(version)) + rhel8, _ = regexp.MatchString(`.*8\.[5-10]\.*`, string(version)) if platform.SkipOSChecks { centos, _ = regexp.MatchString(`7\.\d{1,2}`, string(version)) @@ -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-4]\.*`, string(version)); match { + if match, _ := regexp.MatchString(`.*7\.[3-9]\.*|.*8\.[5-10]\.*|.*9\.[1-5]\.*`, string(version)); match { return "redhat", nil } return "", fmt.Errorf("Unable to determine OS type: %s", string(version)) diff --git a/pkg/pmk/checkNode.go b/pkg/pmk/checkNode.go index 4c17cfd..3490eea 100644 --- a/pkg/pmk/checkNode.go +++ b/pkg/pmk/checkNode.go @@ -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-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-10] & Rocky 9.[1-5]") } if err = allClients.Segment.SendEvent("Starting CheckNode", auth, checkPass, ""); err != nil {