Failed to pre-delete resources for cluster XXXX

Bug #2064190 reported by Felipe Reyes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Invalid
Undecided
Unassigned
Ussuri
New
Undecided
Unassigned
Victoria
Won't Fix
Undecided
Unassigned
Wallaby
Won't Fix
Undecided
Unassigned
magnum (Ubuntu)
Invalid
Undecided
Unassigned
Focal
New
Undecided
Felipe Reyes

Bug Description

[Impact]

When deleting a cluster (k8s) and the load balancer associated to it has already been deleted, a 404 error is returned by Heat which raises a heatclient.exc.HTTPNotFound exception.

Full stack trace:

[req-7a8d257d-9cca-4d2d-b108-de8f33f60ae1 - - - - -] Exception during message handling: magnum.common.exception.PreDeletionFailed: Failed to pre-delete resources for cluster 6d553e2f-74bb-4dbe-9fd1-1a123b76530b, error: ERROR: The Stack (37032d90-66f1-41dd-b584-67d10f438bd9) could not be found..
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/magnum/common/octavia.py", line 109, in delete_loadbalancers
    lb_resources = heat_client.resources.list(
  File "/usr/lib/python3/dist-packages/heatclient/v1/resources.py", line 70, in list
    return self._list(url, "resources")
  File "/usr/lib/python3/dist-packages/heatclient/common/base.py", line 114, in _list
    body = self.client.get(url).json()
  File "/usr/lib/python3/dist-packages/heatclient/common/http.py", line 289, in get
    return self.client_request("GET", url, **kwargs)
  File "/usr/lib/python3/dist-packages/heatclient/common/http.py", line 282, in client_request
    resp, body = self.json_request(method, url, **kwargs)
  File "/usr/lib/python3/dist-packages/heatclient/common/http.py", line 271, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/usr/lib/python3/dist-packages/heatclient/common/http.py", line 234, in _http_request
    raise exc.from_response(resp)
heatclient.exc.HTTPNotFound: ERROR: The Stack (37032d90-66f1-41dd-b584-67d10f438bd9) could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
    res = self.dispatcher.dispatch(message)
  File "/usr/lib/python3/dist-packages/oslo_messaging/rpc/dispatcher.py", line 276, in dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)
  File "/usr/lib/python3/dist-packages/oslo_messaging/rpc/dispatcher.py", line 196, in _do_dispatch
    result = func(ctxt, **new_args)
  File "/usr/lib/python3/dist-packages/magnum/conductor/handlers/cluster_conductor.py", line 191, in cluster_delete
    cluster_driver.delete_cluster(context, cluster)
  File "/usr/lib/python3/dist-packages/magnum/drivers/heat/driver.py", line 162, in delete_cluster
    self.pre_delete_cluster(context, cluster)
  File "/usr/lib/python3/dist-packages/magnum/drivers/heat/driver.py", line 307, in pre_delete_cluster
    octavia.delete_loadbalancers(context, cluster)
  File "/usr/lib/python3/dist-packages/magnum/common/octavia.py", line 130, in delete_loadbalancers
    raise exception.PreDeletionFailed(cluster_uuid=cluster.uuid,
magnum.common.exception.PreDeletionFailed: Failed to pre-delete resources for cluster 6d553e2f-74bb-4dbe-9fd1-1a123b76530b, error: ERROR: The Stack (37032d90-66f1-41dd-b584-67d10f438bd9) could not be found..
2024-03-12 14:38:35.878 3553570 ERROR oslo_messaging.rpc.server

[ Test Plan ]

TBD

[ Where problems could occur ]

TBD

[Other Info]

This issue has been fixed in Magnum by commit https://opendev.org/openstack/magnum/commit/4888f706c8a0280971df398cbc1ff06ad5d63e7f ( https://review.opendev.org/c/openstack/magnum/+/818563 ), this was released in Magnum-14.0.0 (Yoga release) and backported to 13.1.0 (Xena), and even when it was backported into the stable/wallaby branch ( https://review.opendev.org/c/openstack/magnum/+/820334 ), no releases were cut after it was merged

Felipe Reyes (freyes)
Changed in magnum (Ubuntu):
status: New → Invalid
Changed in magnum (Ubuntu Focal):
assignee: nobody → Felipe Reyes (freyes)
Changed in cloud-archive:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.