Bug 1249724 - rhui-lb yum plugin fails to process repository that has a rhui- name prefix but baseurl is a path-url (file:///...) [NEEDINFO]
rhui-lb yum plugin fails to process repository that has a rhui- name prefix b...
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ec2-images (Show other bugs)
7.1
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Joey Boggs
mkovacik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-03 12:05 EDT by mkovacik
Modified: 2018-03-14 04:35 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
augol: needinfo? (jboggs)


Attachments (Terms of Use)

  None (edit)
Description mkovacik 2015-08-03 12:05:00 EDT
Description of problem:
rhui-lb yum plugin fails to process a repo if its name starts with the 'rhui-' prefix but instead of 'http://' the protocol of the url is 'file://' such as

[root@rhua ~]# cat /etc/yum.repos.d/rhui-iso.repo 
[rhui-install-iso]
name=rhui-install
baseurl = file:///mnt
enabled=1
gpgcheck=0
[root@rhua ~]# 

Version-Release number of selected component (if applicable):
rh-amazon-rhui-client-2.2.120-1.el7.noarch


How reproducible:
always

Steps to Reproduce:
1. create a yum repo file with repo name starting with a 'rhui-' prefix and with a basurl attribute  value 'file:///mnt'
2. yum repolist


Actual results:
A traceback is shown as can be seen in the Additional info section

Expected results:
rhui-lb plugin handles the situation of a non-http baseurls gracefully 


Workaround:
renaming the repository such as here the issue disappears as rhui-lb isn't involved anymore:

[root@rhua ~]# cat /etc/yum.repos.d/rhui-iso.repo 
[install-rhui-iso]
name=install-rhui
baseurl = file:///mnt
enabled=1
gpgcheck=0
[root@rhua ~]# 


Additional info:
### Screen log

[root@rhua ~]# yum repolist -v
Not loading "rhnplugin" plugin, as it is disabled
Loading "amazon-id" plugin
Not loading "product-id" plugin, as it is disabled
Loading "rhui-lb" plugin
Not loading "subscription-manager" plugin, as it is disabled
Config time: 0.018
Yum version: 3.4.3
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/supplementary/os
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/rhscl/1/os
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/source/SRPMS
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/optional/debug
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/supplementary/source/SRPMS
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/extras/debug
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/extras/source/SRPMS
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/rh-common/os
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/rhui-client-config/rhel/server/7/x86_64/os
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/optional/source/SRPMS
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/rh-common/source/SRPMS
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/os
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/rhscl/1/source/SRPMS
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/rh-common/debug
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/debug
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/extras/os
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/optional/os
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/rhscl/1/debug
mirrorlist: https://rhui2-cds01.eu-central-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/supplementary/debug
Failed to get region name from EC2
Traceback (most recent call last):
  File "/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 367, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 174, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 571, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 2137, in doCommand
    base.repos.populateSack()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 344, in populateSack
    self.doSetup()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 122, in doSetup
    self.ayum.plugins.run('prereposetup')
  File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/rhui-lb.py", line 142, in prereposetup_hook
    path = urlparse.urlparse(repo.mirrorlist)[2]
  File "/usr/lib64/python2.7/urlparse.py", line 142, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib64/python2.7/urlparse.py", line 181, in urlsplit
    i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'
Comment 2 Jeremy Cline 2015-08-19 14:12:42 EDT
There is now a work-around for this in the rhuiv3 installer, but the issue is still present in the plugin.
Comment 4 Amit Ugol 2018-03-14 04:35:26 EDT
May I ask what the workaround here was?

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