Project

General

Profile

Bug #27845

Katello Installer fails if proxy password has special character at starting.

Added by Ewoud Kohl van Wijngaarden about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Steps to Reproduce:

1. While running the Satellite installer provide the proxy password with special character at starting, for example @redhat

2. It will fail on dbseed with below error:-

~~~
/Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]
~~
~

3. After executing the dbseed manually we will see that dbseed will fail with below error:-

~~
  1. foreman-rake db:seed --trace
    rake aborted!
    Psych::SyntaxError: (<unknown>): did not find expected whitespace or line break while scanning a tag at line 40 column 16
    /opt/rh/rh-ruby25/root/usr/share/ruby/psych.rb:402:in `parse'
    /opt/rh/rh-ruby25/root/usr/share/ruby/psych.rb:402:in `parse_stream'
    /opt/rh/rh-ruby25/root/usr/share/ruby/psych.rb:350:in `parse'
    /opt/rh/rh-ruby25/root/usr/share/ruby/psych.rb:263:in `load'
    /usr/share/foreman/config/settings.rb:26:in `block in <top (required)>'
    /usr/share/foreman/config/settings.rb:25:in `each'
    /usr/share/foreman/config/settings.rb:25:in `<top (required)>'
    /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
    /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
    /usr/share/foreman/config/application.rb:8:in `<top (required)>'
    /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
    /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
    /usr/share/foreman/Rakefile:1:in `<top (required)>'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/rake_module.rb:29:in `load'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/rake_module.rb:29:in `load_rakefile'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:703:in `raw_load_rakefile'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:104:in `block in load_rakefile'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:103:in `load_rakefile'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:82:in `block in run'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
    /opt/rh/rh-ruby25/root/usr/bin/rake:23:in `load'
    /opt/rh/rh-ruby25/root/usr/bin/rake:23:in `<main>'
    ~~~

4. Here dbseed is referring to /usr/share/foreman/config/settings.plugins.d/katello.yaml file which has password with special character and as a result it is failing.

~~~
:cdn_proxy:
:host: http://proxy.example.com
:port: 80
:user: testuser
:password: @redhat

~~~

Actual results:

Installer fails with below error:-

/Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]

Associated revisions

Revision 1b88391e (diff)
Added by Ewoud Kohl van Wijngaarden about 1 year ago

Fixes #27845 - quote values in katello.yaml

Some values may contain special characters that have a meaning in YAML.
By quoting this is avoided.

History

#1 Updated by The Foreman Bot about 1 year ago

  • Assignee set to Ewoud Kohl van Wijngaarden
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/puppet-katello/pull/299 added

#2 Updated by Ewoud Kohl van Wijngaarden about 1 year ago

  • Triaged changed from No to Yes
  • Category set to Foreman modules
  • Subject changed from Satellite Installer fails if proxy password has special character at starting. to Katello Installer fails if proxy password has special character at starting.

#3 Updated by The Foreman Bot about 1 year ago

  • Fixed in Releases 1.24.0 added

#4 Updated by Ewoud Kohl van Wijngaarden about 1 year ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF