Bug 1561750

Summary: [Satellite 6.3] Smart proxy register error while upgrading Satellite from 6.2.14 to 6.3
Product: Red Hat Satellite Reporter: Varatharaja Perumal G <vgunasek>
Component: InstallationAssignee: Ewoud Kohl van Wijngaarden <ekohlvan>
Status: CLOSED CURRENTRELEASE QA Contact: Devendra Singh <desingh>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.3.0CC: ajoseph, bkearney, cmarinea, ehelms, pgervase, shisingh, stbenjam
Target Milestone: UnspecifiedKeywords: PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-24 13:21:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Varatharaja Perumal G 2018-03-28 19:49:55 UTC
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'],
    }
  }

}

***

~~~

Comment 1 Stephen Benjamin 2018-03-28 22:23:50 UTC
Created redmine issue http://projects.theforeman.org/issues/23054 from this bug

Comment 3 Satellite Program 2018-12-06 21:05:05 UTC
Upstream bug assigned to ekohlvan

Comment 4 Satellite Program 2018-12-06 21:05:09 UTC
Upstream bug assigned to ekohlvan

Comment 5 Satellite Program 2018-12-17 01:04:34 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/23054 has been resolved.