Project

Profile

Help

Issue #906

closed

pulp-admin repo tasks list fails with unexpected error

Added by ipanova@redhat.com almost 9 years ago. Updated about 5 years ago.

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

Description

rpm -qa pulp-server
pulp-server-2.7.0-0.2.alpha.git.82.dae006f.fc20.noarch

# pulp-admin -u admin -p admin repo tasks list --repo-id repo1
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

No tasks found

# pulp-admin -u admin -p admin rpm repo delete --repo-id repo1 
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Repository [repo1] successfully deleted

# pulp-admin -u admin -p admin repo tasks list --repo-id repo1
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

An unexpected error has occurred. More information may be found using the -v
flag.

# pulp-admin -u admin -p admin -v repo tasks list --repo-id repo1
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

2015-04-21 15:48:30,247 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 474, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 974, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 210, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/client/admin/tasks.py", line 64, in list
    task_objects = self.retrieve_tasks(**kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/client/admin/tasks.py", line 256, in retrieve_tasks
    response = self.context.server.tasks.get_repo_tasks(repo_id)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/tasks.py", line 84, in get_repo_tasks
    return self.get_all_tasks(tags=[repo_tag])
  File "/usr/lib/python2.7/site-packages/pulp/bindings/tasks.py", line 67, in get_all_tasks
    for doc in sorted(response.response_body, key=lambda x: x['id']['$oid']):
  File "/usr/lib/python2.7/site-packages/pulp/bindings/tasks.py", line 67, in <lambda>
    for doc in sorted(response.response_body, key=lambda x: x['id']['$oid']):
TypeError: string indices must be integers
An unexpected error has occurred. More information may be found using the -v
flag.
# pulp-admin -u admin -p admin tasks list
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  delete
Resources:   repo1 (repository)
State:       Successful
Start Time:  2015-04-21T15:47:06Z
Finish Time: 2015-04-21T15:47:06Z
Task Id:     0d4a9378-758e-423b-8f29-4a6ff1a4855a
Actions #1

Updated by ipanova@redhat.com almost 9 years ago

  • Status changed from NEW to POST
  • Assignee set to ipanova@redhat.com
  • Version deleted (Master)
  • Platform Release set to 2.7.0
Actions #2

Updated by bmbouter almost 9 years ago

Leaving "Version" info on the bug would be good since then historically we know which version a bug was first reported with which is different from what version it was fixed in (Target Release).

Actions #3

Updated by ipanova@redhat.com almost 9 years ago

  • Description updated (diff)
Actions #4

Updated by ipanova@redhat.com almost 9 years ago

Brian, It was my first thought, but since I did not find the 2.7 version in the Version field I just left it blank and added this info in the description of the bug.

Actions #5

Updated by bmbouter almost 9 years ago

Leaving the version at "master" would be fine since it can be reproduced there. I think of version field as helping a bug fixer to know which version they should try to reproduce the issue on. Also mhrivnak and I can create version fields so if one is ever missing, ping me on IRC and we can add it. I generally want a version entry for released versions and betas, but usually not alphas. With 2.7.0 at alpha stage currently, I think setting the version to master is the right thing to do.

Actions #6

Updated by ipanova@redhat.com almost 9 years ago

  • Version set to Master
Actions #7

Updated by ipanova@redhat.com almost 9 years ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by cduryee almost 9 years ago

  • Triaged changed from No to Yes

issue is already in modified state, setting triaged to yes

Actions #9

Updated by dkliban@redhat.com almost 9 years ago

  • Status changed from MODIFIED to 5
Actions #10

Updated by igulina@redhat.com almost 9 years ago

  • Status changed from 5 to 6
>> rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.el7.noarch

>> pulp-admin -u admin -p admin rpm repo list
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  bad_repo
Display Name:        bad_repo
Description:         None
Content Unit Counts: 

Id:                  zoo_repo
Display Name:        zoo_repo
Description:         None
Content Unit Counts: 
  Erratum:          4
  Package Category: 1
  Package Group:    2
  Rpm:              32

>> pulp-admin -u admin -p admin repo tasks list --repo-id bad_repo
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

No tasks found

>> pulp-admin -u admin -p admin rpm repo delete --repo-id bad_repo
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Repository [bad_repo] successfully deleted

>> pulp-admin -u admin -p admin rpm repo delete --repo-id bad_repo
Repository [bad_repo] does not exist on the server

>> pulp-admin -u admin -p admin -v repo tasks list --repo-id bad_repo
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  delete
Resources:   bad_repo (repository)
State:       Successful
Start Time:  2015-06-27T08:44:08Z
Finish Time: 2015-06-27T08:44:08Z
Task Id:     d924633a-8e0f-40ad-8529-98efc76b24f1

>> pulp-admin -u admin -p admin -v repo tasks list --repo-id zoo_repo
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  sync
Resources:   zoo_repo (repository)
State:       Successful
Start Time:  2015-06-26T17:12:19Z
Finish Time: 2015-06-26T17:12:29Z
Task Id:     bafe1aa4-c77b-440d-b00d-8e4225a0d9b2

Operations:  publish
Resources:   zoo_repo (repository)
State:       Successful
Start Time:  2015-06-26T17:12:30Z
Finish Time: 2015-06-26T17:12:31Z
Task Id:     cfd2ba0a-7314-44fd-9584-53ac2175879c

Operations:  publish
Resources:   zoo_repo (repository)
State:       Successful
Start Time:  2015-06-26T17:12:40Z
Finish Time: 2015-06-26T17:12:40Z
Task Id:     48f30109-f662-4143-9007-74f193b375d8

>> pulp-admin -u admin -p admin -v repo tasks list --repo-id repka_puppet
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  import_upload
Resources:   repka_puppet (repository)
State:       Successful
Start Time:  2015-06-25T21:29:50Z
Finish Time: 2015-06-25T21:29:51Z
Task Id:     97a6f05c-f79a-42fd-991b-5764ba93603e

Operations:  import_upload
Resources:   repka_puppet (repository)
State:       Successful
Start Time:  2015-06-25T21:30:02Z
Finish Time: 2015-06-25T21:30:02Z
Task Id:     9dac7647-c204-4608-9ba1-56735e2c9b95

Operations:  publish
Resources:   repka_puppet (repository)
State:       Successful
Start Time:  2015-06-25T21:30:20Z
Finish Time: 2015-06-25T21:30:20Z
Task Id:     30fb4614-bcca-4b22-b885-8bd78c278bd5

on f20

>> rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.fc20.noarch

>> pulp-admin -u admin -p admin -v repo tasks list --repo-id rpm_to_del
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  delete
Resources:   rpm_to_del (repository)
State:       Waiting
Start Time:  Unstarted
Finish Time: Incomplete
Task Id:     f069c2d4-0596-4d30-8e40-4f2fd8782150

Operations:  delete
Resources:   rpm_to_del (repository)
State:       Successful
Start Time:  2015-06-18T09:31:01Z
Finish Time: 2015-06-18T09:31:01Z
Task Id:     c223b2a4-bbbe-47e7-828c-ec8d6c8cbedf
Actions #11

Updated by amacdona@redhat.com over 8 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #13

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF