From 00434e976dcd1697db703cd456ae7e32182d81c5 Mon Sep 17 00:00:00 2001 From: barbacbd Date: Wed, 15 Oct 2025 13:14:24 -0400 Subject: [PATCH] OCPBUGS-62870: Fix firewall checks ** When the ability to search for multiple permissions was added the function was returning an error immediately which is not the behavior necessary. --- pkg/infrastructure/gcp/clusterapi/firewallrules.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/infrastructure/gcp/clusterapi/firewallrules.go b/pkg/infrastructure/gcp/clusterapi/firewallrules.go index 13fbb1fc20..7879090214 100644 --- a/pkg/infrastructure/gcp/clusterapi/firewallrules.go +++ b/pkg/infrastructure/gcp/clusterapi/firewallrules.go @@ -5,6 +5,7 @@ import ( "fmt" "time" + "github.com/sirupsen/logrus" "google.golang.org/api/compute/v1" configv1 "github.com/openshift/api/config/v1" @@ -220,13 +221,15 @@ func hasFirewallPermission(ctx context.Context, projectID string, permissions [] return false, fmt.Errorf("failed to find project permissions during firewall permission check: %w", err) } + permissionsValid := true for _, permission := range permissions { if hasPermission := foundPermissions.Has(permission); !hasPermission { - return false, fmt.Errorf("failed to find firewall permission %s", permission) + logrus.Warnf("failed to find permission %s, skipping firewall rule creation", permission) + permissionsValid = false } } - return true, nil + return permissionsValid, nil } // createFirewallRules creates the rules needed between the worker and master nodes.