-
Notifications
You must be signed in to change notification settings - Fork 368
Closed
Description
When a user tries to fetch details of succeeded tasks (e.g. with GET /v3/tasks?app_guids=<guid>), it might fail with the following error:
Request failed: 500: {"errors"=>[{"title"=>"UnknownError", "detail"=>"An unknown error occurred.", "code"=>10001, "test_mode_info"=>{"detail"=>"docker? delegated to droplet, but droplet is nil", "title"=>"CF-", "backtrace"=>
["/var/vcap/data/packages/cloud_controller_ng/165bc679dd9a0046acc826547d5c3f5e47424c05/cloud_controller_ng/app/models/runtime/task_model.rb:59:in `rescue in docker?'",
"/var/vcap/data/packages/cloud_controller_ng/165bc679dd9a0046acc826547d5c3f5e47424c05/cloud_controller_ng/app/models/runtime/task_model.rb:59:in `docker?'",
"/var/vcap/data/packages/cloud_controller_ng/165bc679dd9a0046acc826547d5c3f5e47424c05/cloud_controller_ng/app/models/runtime/task_model.rb:50:in `run_action_user'",
"/var/vcap/data/packages/cloud_controller_ng/165bc679dd9a0046acc826547d5c3f5e47424c05/cloud_controller_ng/app/presenters/v3/task_presenter.rb:18:in `to_hash'",
"/var/vcap/data/packages/cloud_controller_ng/165bc679dd9a0046acc826547d5c3f5e47424c05/cloud_controller_ng/app/presenters/v3/paginated_list_presenter.rb:60
...
This seems to occur only if the droplet referenced by the task has already been deleted (e.g. by the ExpiredResourceCleanup job).
Following the stack trace, the issue might have been introduced with #4433, released with CAPI release 1.212.0.
Steps to Reproduce:
- Push an app which includes a task
- Start the task
- Push a new version of the app (creates a new droplet)
- Delete the old droplet
- Run
GET /v3/tasks?app_guids=<guid>
tcdowney