Skip to content

Commit d9d84ea

Browse files
Merge pull request #10017 from barbacbd/OCPBUGS-62870
OCPBUGS-62870: Fix firewall checks
2 parents 4651c46 + 00434e9 commit d9d84ea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/infrastructure/gcp/clusterapi/firewallrules.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"time"
77

8+
"github.com/sirupsen/logrus"
89
"google.golang.org/api/compute/v1"
910

1011
configv1 "github.com/openshift/api/config/v1"
@@ -220,13 +221,15 @@ func hasFirewallPermission(ctx context.Context, projectID string, permissions []
220221
return false, fmt.Errorf("failed to find project permissions during firewall permission check: %w", err)
221222
}
222223

224+
permissionsValid := true
223225
for _, permission := range permissions {
224226
if hasPermission := foundPermissions.Has(permission); !hasPermission {
225-
return false, fmt.Errorf("failed to find firewall permission %s", permission)
227+
logrus.Warnf("failed to find permission %s, skipping firewall rule creation", permission)
228+
permissionsValid = false
226229
}
227230
}
228231

229-
return true, nil
232+
return permissionsValid, nil
230233
}
231234

232235
// createFirewallRules creates the rules needed between the worker and master nodes.

0 commit comments

Comments
 (0)