Project

Profile

Help

Issue #1041

Fix the discrepancy in the task state shown in the api and pulp-admin

Added by ipanova@redhat.com over 6 years ago. Updated over 2 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.7.0 Beta
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

We have discrepancy in some task state, this can lead to big confusion
.
For example we say to search for task state 'successful' but in reality it is finished:

$ pulp-admin -u admin -p admin  tasks list --help

Command: list
Description: lists tasks queued (waiting) or running on the server

Available Arguments:

  --all, -a   - if specified, all tasks in all states are shown
  --state, -s - comma-separated list of tasks states desired to be shown.
                Example: "running,waiting,canceled,successful,failed". Do not
                include spaces
[ipanova@ina pulp]$ pulp-admin -u admin -p admin  tasks list --state=successful

+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

No tasks found

[ipanova@ina pulp]$ pulp-admin -u admin -p admin  tasks list --state=finished

+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  delete
Resources:   123 (repository)
State:       Successful
Start Time:  2015-06-09T13:45:18Z
Finish Time: 2015-06-09T13:45:18Z
Task Id:     68f82e64-096b-4cba-b6f1-4adc3694245a

[ipanova@ina pulp]$ curl -H "Accept: application/json" -H "WebFrameworkSwitch: django" -X GET -k -u admin:admin 'https://localhost/pulp/api/v2/tasks/68f82e64-096b-4cba-b6f1-4adc3694245a/'| python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   687  100   672  100    15   2041     45 --:--:-- --:--:-- --:--:--  2042
{
    "_href": "/pulp/api/v2/tasks/68f82e64-096b-4cba-b6f1-4adc3694245a/",
    "_id": {
        "$oid": "5576edee3a9d37c231b56109"
    },
    "_ns": "task_status",
    "error": null,
    "exception": null,
    "finish_time": "2015-06-09T13:45:18Z",
    "id": "5576edee3a9d37c231b56109",
    "progress_report": {},
    "queue": "reserved_resource_worker-1@ina.usersys.redhat.com.dq",
    "result": null,
    "spawned_tasks": [],
    "start_time": "2015-06-09T13:45:18Z",
    "state": "finished",
    "tags": [
        "pulp:repository:123",
        "pulp:action:delete"
    ],
    "task_id": "68f82e64-096b-4cba-b6f1-4adc3694245a",
    "task_type": "pulp.server.tasks.repository.delete",
    "traceback": null,
    "worker_name": "reserved_resource_worker-1@ina.usersys.redhat.com"
}
[ipanova@ina pulp]$ 

Note: "state": "finished" vs State: Successful

Same issue for: error vs Failed

Note: The spelling in the state cannot be changed for backwards compat.


Related issues

Related to Pulp - Story #851: As a user, I can see tasks in particular statesCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Pulp - Task #1028: Search and destroy the word 'cancelled' and modify to 'canceled'CLOSED - WONTFIX

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by mhrivnak over 6 years ago

  • Triaged changed from No to Yes

#2 Updated by ipanova@redhat.com over 6 years ago

  • Related to Story #851: As a user, I can see tasks in particular states added

#3 Updated by ipanova@redhat.com over 6 years ago

  • Project changed from RPM Support to Pulp

#4 Updated by ipanova@redhat.com over 6 years ago

  • Related to Task #1028: Search and destroy the word 'cancelled' and modify to 'canceled' added

#5 Updated by bmbouter over 2 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#6 Updated by bmbouter over 2 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#7 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF