Summary
In the handleProvisioning OnSuccess callback, the one-shot attach path (Pending → Attached, where spec.ComputeInstance is already set before provisioning begins) incorrectly calls getPublicIPAddress which looks up the parking service (osac-pip-<name> in metallb-system). However, after a provisioning playbook with one-shot attach completes, the parking service is deleted and replaced by the ingress service (osac-pip-<name>-ingress in the tenant namespace). This means status.address is never populated on the one-shot attach path.
Expected behavior
status.address should be populated after one-shot attach succeeds, mirroring the logic in handleAttaching (lines 680–705) which correctly queries the ingress service in the tenant namespace.
Suggested fix
Instead of duplicating lookup logic in multiple places, introduce a helper function (or two) to abstract:
- Parking service IP lookup (
osac-pip-<name> in metallb-system)
- Ingress service IP lookup (
osac-pip-<name>-ingress in the tenant namespace)
The one-shot attach block in handleProvisioning OnSuccess should use the ingress service lookup (same as handleAttaching).
Affected code
internal/controller/publicip_controller.go — handleProvisioning OnSuccess, one-shot attach branch (~lines 877–885).
Notes
Reported by: @akshaynadkarni
Summary
In the
handleProvisioningOnSuccesscallback, the one-shot attach path (Pending → Attached, wherespec.ComputeInstanceis already set before provisioning begins) incorrectly callsgetPublicIPAddresswhich looks up the parking service (osac-pip-<name>inmetallb-system). However, after a provisioning playbook with one-shot attach completes, the parking service is deleted and replaced by the ingress service (osac-pip-<name>-ingressin the tenant namespace). This meansstatus.addressis never populated on the one-shot attach path.Expected behavior
status.addressshould be populated after one-shot attach succeeds, mirroring the logic inhandleAttaching(lines 680–705) which correctly queries the ingress service in the tenant namespace.Suggested fix
Instead of duplicating lookup logic in multiple places, introduce a helper function (or two) to abstract:
osac-pip-<name>inmetallb-system)osac-pip-<name>-ingressin the tenant namespace)The one-shot attach block in
handleProvisioningOnSuccess should use the ingress service lookup (same ashandleAttaching).Affected code
internal/controller/publicip_controller.go—handleProvisioningOnSuccess, one-shot attach branch (~lines 877–885).Notes
Reported by: @akshaynadkarni