Bug 1466932 - rhn_package_manager KeyError with -s option when username and password are specified
Summary: rhn_package_manager KeyError with -s option when username and password are sp...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite Proxy 5
Classification: Red Hat
Component: Server
Version: 560
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: sat5-rhn
TreeView+ depends on / blocked
 
Reported: 2017-06-30 18:50 UTC by Patrik Segedy
Modified: 2018-04-09 15:34 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-09 15:34:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Patrik Segedy 2017-06-30 18:50:17 UTC
Description of problem:
When you run rhn_package_manager with -s, --username and --password options, it throws KeyError. It's because of wrong channel name.

Version-Release number of selected component (if applicable):
spacewalk-proxy-package-manager-2.0.1-11.el5sat

How reproducible:
always

Steps to Reproduce:
1. Create channel
2. Push package to channel using rhn_package_manager
# yumdownloader zsh
zsh-4.2.6-10.el5_11.x86_64.rpm

# rhn_package_manager -c proxy_pkg_manager_3581 zsh-4.2.6-10.el5_11.x86_64.rpm --username=user --password=pass

3. Everything is good when I run rhn_package_manager without --username and --password
When I change source and print out list p:
['zsh', '4.2.6', '10.el5_11', '', 'x86_64', 'proxy_pkg_manager_3581']

channelName = p[5]
p[5] = 'proxy_pkg_manager_3581'
it's correct channel name

4. When I run rhn_package_manager with --username --password, I get KeyError
# rhn_package_manager -s -c proxy_pkg_manager_3581  --username=user --password=pass

Traceback (most recent call last):
  File "/usr/bin/rhn_package_manager", line 27, in ?
    rhn_package_manager.main()
  File "/usr/share/rhn/PackageManager/rhn_package_manager.py", line 97, in main
    upload.checkSync()
  File "/usr/share/rhn/PackageManager/rhn_package_manager.py", line 199, in checkSync
    remotePackages[channelName][key] = None
KeyError: 'md5'

I print same list as in previous step:
['zsh', '4.2.6', '10.el5_11', '', 'x86_64', 'md5', 'dcb5e442e8b35c592e11ece2337fbe73', 'proxy_pkg_manager_3581']

channelName = p[5]
p[5] = 'md5'
Therefore channelName is incorrect and it throws KeyError

Actual results:
KeyError because of wrong channelName

Expected results:
It should work with --username --password without KeyError

Comment 4 Tomas Lestach 2018-04-09 15:34:11 UTC
We have re-reviewed this bug, as part of an ongoing effort to improve Satellite/Proxy feature and bug updates, review and backlog.

This is a low priority bug and has no currently open customer cases. While this bug may still valid, we do not see it being implemented prior to the EOL of the Satellite 5.x product. As such, this is being CLOSED DEFERRED. 

Closing now to help set customer expectations as early as possible. You are welcome to re-open this bug if needed.


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