You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps did you take and what happened:
In any setup create machinedeployment, wait machines and openstackmachines to be ready state and delete instance inside openstack project (via cli or horizon ui). CAPO controller crashes with nil pointer dereference.
Traced it to:
openstackmachine_controller.go reconcileNormal()
var instanceStatus *compute.InstanceStatus
if instanceStatus, err = computeService.GetInstanceStatus(*machineServer.Status.InstanceID); err != nil {
return ctrl.Result{}, err
}
instanceNS, err := instanceStatus.NetworkStatus() // <- here we got nil pointer dereference
Which leads to
instance.go
func (s *Service) GetInstanceStatus(resourceID string) (instance *InstanceStatus, err error) {
if resourceID == "" {
return nil, fmt.Errorf("resourceId should be specified to get detail")
}
server, err := s.getComputeClient().GetServer(resourceID)
if err != nil {
if capoerrors.IsNotFound(err) {
return nil, nil // <- returns nil,nil. Which leads to instanceStatus.NetworkStatus() produce error
}
return nil, fmt.Errorf("get server %q detail failed: %v", resourceID, err)
}
return &InstanceStatus{server, s.scope.Logger()}, nil
}
What did you expect to happen:
That CAPO would handle the absence of instance and change status of OpenStackMachine by changing a condition or requeueing.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
Cluster API Provider OpenStack version (Or git rev-parse HEAD if manually built): v0.11.3
Cluster-API version: v1.8.4
OpenStack version: Antelope 2023.1
Kubernetes version (use kubectl version): v1.30.2
OS (e.g. from /etc/os-release): rocky-9
The text was updated successfully, but these errors were encountered:
/kind bug
What steps did you take and what happened:
In any setup create machinedeployment, wait machines and openstackmachines to be ready state and delete instance inside openstack project (via cli or horizon ui). CAPO controller crashes with nil pointer dereference.
Traced it to:
openstackmachine_controller.go reconcileNormal()
Which leads to
instance.go
Logs:
What did you expect to happen:
That CAPO would handle the absence of instance and change status of OpenStackMachine by changing a condition or requeueing.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
git rev-parse HEAD
if manually built): v0.11.3kubectl version
): v1.30.2/etc/os-release
): rocky-9The text was updated successfully, but these errors were encountered: