Bug #23054
closedSmart proxy register error when apache is not started first
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
- 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.
- 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'],
}
}
}
~~~