Bug 1404330 - 'rhui-manager packages upload' returns an error and a traceback, but upload is successful
Summary: 'rhui-manager packages upload' returns an error and a traceback, but upload i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.0.0
Assignee: RHUI Bug List
QA Contact: Irina Gulina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-13 15:40 UTC by Irina Gulina
Modified: 2017-03-01 22:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-01 22:14:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0367 0 normal SHIPPED_LIVE Red Hat Update Infrastructure 3.0 Release 2017-03-02 03:05:22 UTC

Description Irina Gulina 2016-12-13 15:40:54 UTC
Description of problem:
'rhui-manager packages upload' returns an error and a traceback, however package is uploaded

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

How reproducible:
always

Steps to Reproduce:
1. rhui-manager packages upload

Actual results:
>> rhui-manager packages upload --repo_id unprotected_repo_1 --packages /tmp/zsh-5.0.2-25.el7.x86_64.rpm

Uploading /tmp/zsh-5.0.2-25.el7.x86_64.rpm...

An unexpected error has occurred during the last operation.
'RepositoryAPI' object has no attribute 'generate_metadata'
Unexpected error caught at the shell level

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/rhui/tools/cli.py", line 65, in run
    Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/rhui/common/cli.py", line 272, in run
    command_or_section.execute(remaining_args)
  File "/usr/lib/python2.7/site-packages/rhui/common/cli.py", line 113, in execute
    self.method(**arg_dict)
  File "/usr/lib/python2.7/site-packages/rhui/tools/commands/packages.py", line 71, in upload
    self.pulp.generate_metadata([repo_id])
  File "/usr/lib/python2.7/site-packages/rhui/tools/pulp_api.py", line 916, in generate_metadata
    self.repo_api.generate_metadata(repo_id)
AttributeError: 'RepositoryAPI' object has no attribute 'generate_metadata'
2016-12-02 13:49:51,706 - 'RepositoryAPI' object has no attribute 'generate_metadata'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/rhui/tools/cli.py", line 65, in run
    Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/rhui/common/cli.py", line 272, in run
    command_or_section.execute(remaining_args)
  File "/usr/lib/python2.7/site-packages/rhui/common/cli.py", line 113, in execute
    self.method(**arg_dict)
  File "/usr/lib/python2.7/site-packages/rhui/tools/commands/packages.py", line 71, in upload
    self.pulp.generate_metadata([repo_id])
  File "/usr/lib/python2.7/site-packages/rhui/tools/pulp_api.py", line 916, in generate_metadata
    self.repo_api.generate_metadata(repo_id)
AttributeError: 'RepositoryAPI' object has no attribute 'generate_metadata'

>> rhui-manager repo info --repo_id unprotected_repo_1
Name:                unprotected_repo_1
Type:                Custom
Relative Path:       unprotected/unprotected_repo_1
GPG Check:           No
Package Count:       1

>> rhui (repo) => p

Choose a repository:
  1  - RHEL RHUI Server 7 OS (7Server-x86_64)
  2  - RHEL RHUI Server 7 Rhgs-server 3.1 OS (7Server-x86_64)
  3  - Red Hat Update Infrastructure 2.0 (RPMs) (6Server-i386)
  4  - Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64)
  5  - unprotected_repo_1
Enter value (1-5) or 'b' to abort: 5

Enter the first few characters (case insensitive) of an RPM to filter the results
(blank line for no filter):


Only filtered results that contain less than 100 packages will have their
contents displayed. Results with more than 100 packages will display
a package count only.

Packages:
  zsh-5.0.2-25.el7.x86_64.rpm

Comment 3 Irina Gulina 2016-12-14 16:29:50 UTC
rhel7 iso 20161213

No traceback:
>> rhui-manager packages upload --repo_id unprotected_repo1 --packages /tmp/zsh-5.0.2-25.el7.x86_64.rpm
Uploading /tmp/zsh-5.0.2-25.el7.x86_64.rpm...

Please add a message which reports successful upload.

Comment 4 Irina Gulina 2016-12-15 18:02:28 UTC
iso 20161214

rhui-manager packages upload --repo_id protected_repo1 --packages /tmp/zsh-5.0.2-25.el7.x86_64.rpm
Uploading /tmp/zsh-5.0.2-25.el7.x86_64.rpm...
/tmp/zsh-5.0.2-25.el7.x86_64.rpm successfully uploaded

------------------------------------------------------------------------------
rhui (repo) => p

Choose a repository:
  1  - protected_repo1
Enter value (1-1) or 'b' to abort: 1

Enter the first few characters (case insensitive) of an RPM to filter the results
(blank line for no filter):


Only filtered results that contain less than 100 packages will have their
contents displayed. Results with more than 100 packages will display
a package count only.

Packages:
  zsh-5.0.2-25.el7.x86_64.rpm

Comment 5 errata-xmlrpc 2017-03-01 22:14:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0367


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