Project

General

Profile

Actions

Bug #20216

closed

Getting "password component depends user component" error while refreshing manifest

Added by Chris Roberts almost 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from BZ:

Description of problem:
User getting this error when trying to refresh the manifest through a http proxy without username and password.

This is the regression of bug 1436242 that converts the "uri.user" and "uri.password" to empty strings and cause the uri module/ruby to treat them as valid strings.

2017-06-26 12:20:47 [katello/glue] [I] Task regenerate upstream certificates for: Default Organization (1/6) > Katello::Provider.find(2).owner_regenerate_upstream_certificates({"id"=>"8ac8a6bc5b32)
2017-06-26 12:20:47 [app] [E] Error during manifest refresh: {"displayMessage"=>"password component depends user component", "conflicts"=>["UNKNOWN"]}
2017-06-26 12:20:47 [foreman-tasks/action] [E] password component depends user component (URI::InvalidURIError) | /opt/rh/rh-ruby22/root/usr/share/ruby/uri/generic.rb:423:in `check_password' | /opt/rh/rh-ruby22/root/usr/share/ruby/uri/generic.rb:501:in `password=' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.137/app/lib/katello/resources/candlepin.rb:276:in `resource' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.137/app/lib/katello/resources/candlepin.rb:301:in `update' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.137/app/models/katello/glue/provider.rb:137:in `owner_regenerate_upstream_certificates' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.137/app/models/katello/glue.rb:164:in `execute' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.137/app/models/katello/glue.rb:114:in `block in process' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.137/app/models/katello/glue.rb:101:in `each' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.137/app/models/katello/glue.rb:101:in `process'

In "/opt/rh/rh-ruby22/root/usr/share/ruby/uri/generic.rb" file

def set_userinfo(user, password = nil)
unless password
user, password = split_userinfo(user) <======= This will set the username to nil if empty string is provided
end
@user = user
@password = password if password
[@user, @password]
...
def check_password(v, user = @user)
if @opaque
raise InvalidURIError,
"can not set password with opaque"
end
return v unless v
if !user
raise InvalidURIError, <================== Which raise an error when the password is an empty string and username is nil
"password component depends user component"
end
...

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

Steps to Reproduce:
1. Run the satellite-installer to setup a proxy without username and password
satellite-installer --scenario satellite --katello-proxy-url http://proxy.defcen.gov.au --katello-proxy-port 8080 --katello-proxy-username "" --katello-proxy-password ""
2. Refresh the manifest

Actions #1

Updated by The Foreman Bot almost 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6850 added
Actions #2

Updated by Justin Sherrill almost 7 years ago

  • translation missing: en.field_release set to 267
Actions #3

Updated by Chris Roberts almost 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Eric Helms over 6 years ago

  • translation missing: en.field_release changed from 267 to 281
Actions

Also available in: Atom PDF