-
Notifications
You must be signed in to change notification settings - Fork 278
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
/kind bug
What steps did you take and what happened:
When creating security group rules in OpenStack, if a rule already exists, the operation fails with HTTP 409 error instead of being treated as idempotent.
What did you expect to happen:
Security group rule creation should be idempotent - if a rule already exists, it should be treated as a successful operation.
Have fixed it here:
cluster-api-provider-openstack/pkg/cloud/services/networking/securitygroups.go
Lines 568 to 572 in 0ab4e3c
// Handle HTTP 409 (SecurityGroupRuleExists) as success - the rule already exists | |
if strings.Contains(err.Error(), "SecurityGroupRuleExists") || strings.Contains(err.Error(), "already exists") { | |
s.scope.Logger().V(4).Info("Security group rule already exists, treating as success", "description", r.Description, "securityGroupID", securityGroupID) | |
return nil | |
} |
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Type
Projects
Status
Inbox