{"record":{"id":"8edcff3c7f6d8f08","repo":"kubernetes/kops","slug":"error-creating-securitygrouprule-in-sg-s-v","errorCode":null,"errorMessage":"error creating SecurityGroupRule in SG %s: %v","messagePattern":"error creating SecurityGroupRule in SG (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/securitygrouprule.go","lineNumber":178,"sourceCode":"\t\t\t\tetherType = \"IPv6\"\n\t\t\t}\n\t\t}\n\t\topt := sgr.CreateOpts{\n\t\t\tDirection:      sgr.RuleDirection(fi.ValueOf(e.Direction)),\n\t\t\tEtherType:      sgr.RuleEtherType(etherType),\n\t\t\tSecGroupID:     fi.ValueOf(e.SecGroup.ID),\n\t\t\tPortRangeMax:   IntValue(e.PortRangeMax),\n\t\t\tPortRangeMin:   IntValue(e.PortRangeMin),\n\t\t\tProtocol:       sgr.RuleProtocol(fi.ValueOf(e.Protocol)),\n\t\t\tRemoteIPPrefix: fi.ValueOf(e.RemoteIPPrefix),\n\t\t}\n\t\tif e.RemoteGroup != nil {\n\t\t\topt.RemoteGroupID = fi.ValueOf(e.RemoteGroup.ID)\n\t\t}\n\n\t\tr, err := t.Cloud.CreateSecurityGroupRule(opt)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error creating SecurityGroupRule in SG %s: %v\", fi.ValueOf(e.SecGroup.GetName()), err)\n\t\t}\n\n\t\te.ID = new(r.ID)\n\t\treturn nil\n\t}\n\n\tklog.V(2).Infof(\"Openstack task SecurityGroupRule::RenderOpenstack did nothing\")\n\treturn nil\n}\n\nvar _ fi.HasLifecycle = (*SecurityGroupRule)(nil)\n\n// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle\nfunc (o *SecurityGroupRule) GetLifecycle() fi.Lifecycle {\n\treturn o.Lifecycle\n}\n\n// SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/securitygrouprule.go#L160-L196","documentation":"Creating a security-group rule via the Neutron API failed during apply. The wrapped error identifies the rejection, commonly invalid CIDR, port range, duplicate rule, or quota issues.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/openstacktasks/securitygrouprule.go:178 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the rejected field","Validate CIDR, protocol and port range values","Remove conflicting duplicate rules and retry"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}