Project

General

Profile

Bug #23054

Smart proxy register error when apache is not started first

Added by Stephen Benjamin almost 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1561750

Description of problem:

Smart proxy register error while upgrading Satellite from 6.2.14 to 6.3

~~
INFO 2018-03-27 14:52:48 main] Puppet has finished, bye!
[ INFO 2018-03-27 14:52:48 main] Executing hooks in group post
[DEBUG 2018-03-27 14:52:48 main] Hook /usr/share/katello-installer-base/hooks/post/10-post_install.rb returned nil
[ INFO 2018-03-27 14:52:48 main] pulp.conf is already present, skipping
[DEBUG 2018-03-27 14:52:48 main] Hook /usr/share/katello-installer-base/hooks/post/29-create_package_httpd_conf.rb returned ["pulp.conf"]
[ERROR 2018-03-27 14:52:48 main] Upgrade failed during the installation phase. Fix the error and re-run the upgrade.
[DEBUG 2018-03-27 14:52:48 main] Hook /usr/share/katello-installer-base/hooks/post/30-upgrade.rb returned [<Logging::Logger:0xdb22e8 name="main">, <Logging::Logger:0xdbdae4 n
ame="fatal">]
[DEBUG 2018-03-27 14:52:48 main] Hook /usr/share/katello-installer-base/hooks/post/31-upgrade-puppet.rb returned nil
[ INFO 2018-03-27 14:52:48 main] All hooks in group post finished
[DEBUG 2018-03-27 14:52:48 main] Exit with status code: 6 (signal was 6)
[ERROR 2018-03-27 14:52:48 main] Errors encountered during run:
[ERROR 2018-03-27 14:52:48 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[satellite.example.com]: Could not evaluate: Exception Connection refused - co
nnect(2) in get request to: https://satellite.example.com/api/v2/smart_proxies?search=name=%22satellite.example.com%22
~
~
Version-Release number of selected component (if applicable):

Satellite 6.3

Actual results:

Smart proxy registration fails

[ERROR 2018-03-27 14:52:48 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[satellite.example.com]: Could not evaluate: Exception Connection refused - co
nnect(2) in get request to: https://satellite.example.com/api/v2/smart_proxies?search=name=%22satellite.example.com%22

Expected results:

The upgrade should complete successfully.

Additional info:

Workaround suggested by Stephen.

~~~
1) Backup the file

  1. cp /usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp /usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp.bk

2) Add httpd service as required.


  1. Register the foreman proxy
    class foreman_proxy::register {

    if $foreman_proxy::register_in_foreman {
    foreman_smartproxy { $foreman_proxy::registered_name:
    ensure => present,
    base_url => $foreman_proxy::foreman_base_url,
    consumer_key => $foreman_proxy::oauth_consumer_key,
    consumer_secret => $foreman_proxy::oauth_consumer_secret,
    effective_user => $foreman_proxy::oauth_effective_user,
    ssl_ca => pick($foreman_proxy::foreman_ssl_ca, $foreman_proxy::ssl_ca),
    url => $foreman_proxy::real_registered_proxy_url,
    require => Service['httpd'],
    }
    }

}


~~~


Related issues

Related to Installer - Bug #25684: foreman-installer missing dependenciesDuplicate

Associated revisions

Revision 7dfb2167 (diff)
Added by Ewoud Kohl van Wijngaarden about 2 years ago

Fixes #23054 - Refactor class inclusion

History

#1 Updated by The Foreman Bot over 2 years ago

  • Assignee set to Ewoud Kohl van Wijngaarden
  • Pull request https://github.com/theforeman/puppet-foreman/pull/633 added

#2 Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing

#3 Updated by The Foreman Bot about 2 years ago

  • Pull request https://github.com/theforeman/puppet-foreman/pull/700 added

#4 Updated by Ewoud Kohl van Wijngaarden about 2 years ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Ewoud Kohl van Wijngaarden about 2 years ago

  • Related to Bug #25684: foreman-installer missing dependencies added

Also available in: Atom PDF