From c59773298723d509ab651f2e0583dfac4fd35828 Mon Sep 17 00:00:00 2001 From: davdhacs <105243888+davdhacs@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:18:02 -0600 Subject: [PATCH 1/3] analyze non-rhcos nodes --- pkg/nodeinventory/inventorizer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/nodeinventory/inventorizer.go b/pkg/nodeinventory/inventorizer.go index a68317e58..dc2ecd6f9 100644 --- a/pkg/nodeinventory/inventorizer.go +++ b/pkg/nodeinventory/inventorizer.go @@ -47,7 +47,7 @@ func (n *Scanner) Scan(nodeName string) (*ScanResult, error) { "/host/", nodes.AnalyzeOpts{ UncertifiedRHEL: false, - IsRHCOSRequired: true}, + IsRHCOSRequired: false}, ) scanDuration := time.Since(startTime) From cc81f16ddb6840fbe950f3fe557785c2797585dd Mon Sep 17 00:00:00 2001 From: davdhacs <105243888+davdhacs@users.noreply.github.com> Date: Wed, 4 Jun 2025 23:33:17 -0600 Subject: [PATCH 2/3] allow node scan on rhel prefixes --- pkg/analyzer/detection/detection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/analyzer/detection/detection.go b/pkg/analyzer/detection/detection.go index b42a92204..d73ec756e 100644 --- a/pkg/analyzer/detection/detection.go +++ b/pkg/analyzer/detection/detection.go @@ -45,7 +45,7 @@ type DetectComponentOpts struct { // if CoreOS is required for DetectComponents, the namespace must start with `rhcos` func DetectComponents(name string, files analyzer.Files, parent *database.Layer, languageComponents []*component.Component, opts DetectComponentOpts) (*database.Namespace, []database.FeatureVersion, *database.RHELv2Components, []*component.Component, error) { namespace := DetectNamespace(name, files, parent, opts.UncertifiedRHEL) - if namespace != nil && opts.IsRHCOSRequired && !wellknownnamespaces.IsRHCOSNamespace(namespace.Name) { + if namespace != nil && opts.IsRHCOSRequired && !wellknownnamespaces.IsRHCOSNamespace(namespace.Name) && !wellknownnamespaces.IsRHELNamespace(namespace.Name) { logrus.WithFields(logrus.Fields{LogLayerName: name, "detected namespace": namespace.Name}).Warning("Unable to start node scanning for this namespace") return namespace, nil, nil, nil, ErrNodeScanningUnavailable } From a0c4215edd0659a6ab93126c764d077ead443e3f Mon Sep 17 00:00:00 2001 From: davdhacs <105243888+davdhacs@users.noreply.github.com> Date: Wed, 4 Jun 2025 23:33:19 -0600 Subject: [PATCH 3/3] Revert "analyze non-rhcos nodes" This reverts commit c59773298723d509ab651f2e0583dfac4fd35828. --- pkg/nodeinventory/inventorizer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/nodeinventory/inventorizer.go b/pkg/nodeinventory/inventorizer.go index dc2ecd6f9..a68317e58 100644 --- a/pkg/nodeinventory/inventorizer.go +++ b/pkg/nodeinventory/inventorizer.go @@ -47,7 +47,7 @@ func (n *Scanner) Scan(nodeName string) (*ScanResult, error) { "/host/", nodes.AnalyzeOpts{ UncertifiedRHEL: false, - IsRHCOSRequired: false}, + IsRHCOSRequired: true}, ) scanDuration := time.Since(startTime)