Bug 862856 - Running repo export results in error in admin.log
Running repo export results in error in admin.log
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
Master
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 41
Assigned To: Sayli Karmarkar
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-03 14:45 EDT by Preethi Thomas
Modified: 2015-03-22 21:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:08:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Preethi Thomas 2012-10-03 14:45:26 EDT
Description of problem:

Running a repo export on a repository failed with unexpected error.

Version-Release number of selected component (if applicable):

[root@pulp-master ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.330-1.fc17.noarch
[root@pulp-master ~]# 

How reproducible:


Steps to Reproduce:


[root@pulp-master ~]# pulp-admin -u admin -p admin rpm repo export run --repo-id pulp
+----------------------------------------------------------------------+
   Publishing Repository [pulp] using distributor [iso_distributor] 
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Exporting packages...
[==================================================] 100%
Rpms: 41/41 items
... completed

Exporting errata...
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

[root@pulp-master ~]# 

1.
2.
3.
  
Actual results:


Expected results:


Additional info:

2012-10-03 14:40:20,401 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 476, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 933, 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 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/sync_publish.py", line 207, in run
    status.display_task_status(self.context, self.renderer, task_id)
  File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/status/status.py", line 41, in display_task_status
    _display_status(context, renderer, task_list)
  File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/status/status.py", line 92, in _display_status
    _display_task_status(context, renderer, task.task_id, quiet_waiting=quiet_waiting)
  File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/status/status.py", line 128, in _display_task_status
    renderer.display_report(response.response_body.progress)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/status.py", line 416, in display_report
    self.render_errata_step(progress_report)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/status.py", line 493, in render_errata_step
    render_itemized_in_progress_state(self.prompt, data, _('errata'), self.errata_bar, state)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/common/status_utils.py", line 85, in render_itemized_in_progress_state
    items_done = data['items_total'] - data['items_left']
KeyError: 'items_total'
Comment 1 Sayli Karmarkar 2012-10-21 20:25:22 EDT
Preethi, please re-test with the latest build. There have been quite a few changes in repo export output and moreover we are not tracking errata progress separately, it is a part of metadata generation tracking. I confirmed with latest code that it is working as expected. Here is what the output should look like now - 

$ pulp-admin rpm repo export run --repo-id test-pulp
+----------------------------------------------------------------------+
                   Publishing Repository [test-pulp]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Exporting packages...
[==================================================] 100%
Rpms: 40/40 items
... completed

Exporting distributions...
[==================================================] 100%
Distributions: 0/0 items
... completed

Generating metadata
[\]
... completed

Creating ISOs...
[==================================================] 100%
... completed

Successfully published ISOs over HTTPS

ISOs created:
    test-pulp-20121021-01.iso


Let me know if you see any more issues.

Thanks,
Comment 2 Preethi Thomas 2012-10-23 14:58:35 EDT
verified

[root@pulp-master ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.333-1.fc17.noarch

[root@pulp-master ~]# pulp-admin -u admin -p admin rpm repo export run --repo-id zoo
+----------------------------------------------------------------------+
                      Publishing Repository [zoo]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Exporting packages...
[==================================================] 100%
Rpms: 32/32 items
... completed

Exporting distributions...
[==================================================] 100%
Distributions: 0/0 items
... completed

Generating metadata
[-]
... completed

Creating ISOs...
[==================================================] 100%
... completed

Successfully published ISOs over HTTPS

ISOs created:
    zoo-20121023-01.iso

[root@pulp-master ~]#
Comment 3 Preethi Thomas 2013-01-09 12:08:44 EST
Pulp v2.0 released

Note You need to log in before you can comment on or make changes to this bug.