Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion pkg/cloud/openstack/clients/machineservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,18 @@ func (is *InstanceService) InstanceDelete(id string) error {
}

// delete instance
return servers.Delete(is.computeClient, id).ExtractErr()
err = servers.Delete(is.computeClient, id).ExtractErr()

// we don't report HTTP 404 since that's okay - the server is gone already
if err != nil {
if httpStatus, ok := err.(gophercloud.ErrDefault404); ok {
if httpStatus.Actual == 404 {
klog.Infof("Couldn't find instance %v to delete: %v", id, err)
return nil
}
}
}
return err
}

func GetTrunkSupport(is *InstanceService) (bool, error) {
Expand Down