Bug #25036
closedpuppet agent starts before installer registers capsule to satellite and fails with registering the host
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