Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] cancelling a task results in No Such Task error #647

Open
thomasmitchell opened this issue Nov 13, 2019 · 5 comments
Open

[BUG] cancelling a task results in No Such Task error #647

thomasmitchell opened this issue Nov 13, 2019 · 5 comments
Labels
triage Issues that are pending triage / validation by a SHIELD contributor
Milestone

Comments

@thomasmitchell
Copy link
Contributor

Describe the bug
Using the CLI, attempting to cancel a task results in no such task, even though putting in the UUID can return you information about the task itself.

$ shield --core my-core --tenant Ops cancel 25550307-ad4a-4b55-bedd-b9886683a40b
Owner:        tmitchell@local
Type:         backup
Status:       running

Started at:   2019-11-12 17:28:36+0000
Stopped at:   (running)

Job:          Daily (5862679a-a6f6-4cba-89da-a725ba5a81f5)
Archive UUID: 10dbe967-8355-460d-a80e-406c3f9debff
Cancel this task? [y/N] y
!!! No such task

To Reproduce
Steps to reproduce the behavior:

  1. Start a task that runs long enough to cancel
  2. Try to cancel it with the CLI
  3. See error

Expected behavior
It should have cancelled the task

Screenshots
If applicable, add screenshots to help explain your problem.

SHIELD versions (please complete the following information):

  • SHIELD Core: 8.5.0
  • SHIELD CLI: 8.5.0

Browser version(s) (please complete if reporting a web UI bug):

  • OS: [e.g. OSX, windows]
  • Browser: [e.g. firefox, chrome, safari]
  • Version: [e.g. 22]

Additional context
Add any other context about the problem here.

The task is not cancelled following the command, so the error is not just a mishandled check afterward.

@thomasmitchell thomasmitchell added the triage Issues that are pending triage / validation by a SHIELD contributor label Nov 13, 2019
@thomasmitchell
Copy link
Contributor Author

It appears to be broken in the 8.5.0 CLI. I can't look up a task by its UUID at all on this version.

Request:
GET /v2/tasks/25550307-ad4a-4b55-bedd-b9886683a40b HTTP/1.1
Host: THERE
Accept: application/json
X-Shield-Session: REDACTED


---------------------------
Response:
HTTP/1.1 404 Not Found
Connection: close
Content-Length: 25
Content-Type: application/json
Date: Wed, 13 Nov 2019 03:05:59 GMT
Server: nginx

{"error":"No such task"}

Even though that UUID was fetched from the list of UUIDs by the CLI by providing a substring of it.

@thomasmitchell
Copy link
Contributor Author

Having talked with James out of band, its likely that this was caused by not providing the --tenant flag on the command line to look at the task. The task can be listed without the flag, but not actually looked up individually.

@thomasmitchell
Copy link
Contributor Author

Tried this again today with the --tenant flag properly given, and it still gives No Such Task.

trace shows

DELETE /v2/tenants/ACTUAL-TENANT-ID/tasks/ACTUAL-TASK-ID b HTTP/1.1

@mordax7
Copy link
Contributor

mordax7 commented Mar 23, 2020

In which version can we see this fix?

@jhunt
Copy link
Contributor

jhunt commented Mar 27, 2020

The fix in 7a30447 would have been included in v8.6.1 and onward.

@jhunt jhunt added this to the v9 milestone Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issues that are pending triage / validation by a SHIELD contributor
Development

No branches or pull requests

3 participants