-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
-
None
-
5
-
False
-
None
-
False
-
-
If a OpenShift Cluster is created and associated with a cloud provider that has an existing infrastructure with a different region/account, the provider will not be updated to include the infrastructure resulting in OCP on Cloud summary not triggering.
This happens because we now get a region and account during provider infra map sql so when we call get or create and include those fields, django attempts to create a new object but since ProviderInfrastructureMap is unique on infrastructure_provider and infrastructure_type it fails. We catch this error and attempt to filter for the record but since the existing record for that infrastructure_provider and infrastructure_type does not have the same region and account, the filter finds no objects and we do not pass back an infrastructuremap object to update the provider with.
Relevant code locations:
- OCP Infrastructure Map SQL
- Object Creation for ProviderInfrastructureMap
- DB Model for ProviderInfrastructureMap
Relevant slack conversation: https://redhat-internal.slack.com/archives/C04476G1F7H/p1713304769444639