Project

General

Profile

Bug #25036

puppet agent starts before installer registers capsule to satellite and fails with registering the host

Added by Evgeni Golov 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Foreman modules
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

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

Description of problem:
satellite-installer --scenario capsule
ends up with capsule added to satellite, but fails to add the capsule host to "/hosts" -
this seems to be caused by puppet agent being started before the capsule registration occurs:

[ WARN 2018-08-23T17:13:49 verbose] /Stage[main]/Puppet::Agent::Service::Daemon/Service[puppet]/ensure: ensure changed 'stopped' to 'running'
...
[ WARN 2018-08-23T17:14:02 verbose] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[zlw1-capsule.redhat.com]/ensure: created

- the agent tries to send the host facts and receives 403 errors, which are ignored:

2018-08-23T23:13:58 [I|app|] Started POST "/api/hosts/facts" for 10.8.30.34 at 2018-08-23 23:13:58 +0200
2018-08-23T23:13:58 [I|app|e90be] Processing by Api::V2::HostsController#facts as JSON
2018-08-23T23:13:58 [I|app|e90be] Parameters: {"facts"=>"[FILTERED]", "name"=>"zlw1-capsule.redhat.com", "certname"=>"zlw1-qe-sat64-rhel7-tier3-capsule.lab.eng.rdu2.redhat.com", "apiv"=>"v2", "host"=>{"certname"=>"zlw1-capsule.redhat.com", "name"=>"zlw1-qe-sat64-rhel7-tier3-capsule.lab.eng.rdu2.redhat.com"}}
2018-08-23T23:13:58 [W|app|e90be] No smart proxy server found on ["zlw1-capsule.redhat.com"] and is not in trusted_hosts
2018-08-23T23:13:58 [I|app|e90be] Rendering api/v2/errors/access_denied.json.rabl within api/v2/layouts/error_layout
2018-08-23T23:13:58 [I|app|e90be] Rendered api/v2/errors/access_denied.json.rabl within api/v2/layouts/error_layout (1.7ms)
2018-08-23T23:13:58 [I|app|e90be] Filter chain halted as #<Proc:0x000000000bdfb438@/usr/share/foreman/app/controllers/concerns/foreman/controller/smart_proxy_auth.rb:14> rendered or redirected
2018-08-23T23:13:58 [I|app|e90be] Completed 403 Forbidden in 29ms (Views: 7.4ms | ActiveRecord: 12.5ms)

- rerunning the installer helps, since the capsule already exists.

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

How reproducible:
always

Steps to Reproduce:
1. just run the satellite-installer --scenario capsule

Actual results:
- error (warning) in installer log, capsule host not created

Expected results:
the orchestration is ordered correctly, capsule host is added to foreman properly, no errors in the log

Associated revisions

Revision e39a036e (diff)
Added by Evgeni Golov 2 months ago

Fixes #25036 - ensure proxy registration happens before puppet

History

#1 Updated by Evgeni Golov 3 months ago

  • Assignee set to Evgeni Golov
  • Subject changed from puppet agent starts before installer registers capsule to satellite and fails with registering the host to puppet agent starts before installer registers capsule to satellite and fails with registering the host

#2 Updated by Evgeni Golov 3 months ago

  • Project changed from Foreman to Installer

#3 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/456 added

#4 Updated by The Foreman Bot 3 months ago

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

#5 Updated by Evgeni Golov 3 months ago

  • Pull request deleted (https://github.com/theforeman/puppet-puppet/pull/634)

#6 Updated by Evgeni Golov 2 months ago

  • Status changed from Ready For Testing to Closed

#7 Updated by Tomer Brisker 2 months ago

  • Category set to Foreman modules
  • Fixed in Releases 1.20.0 added

Also available in: Atom PDF