This message was deleted.
# puppet-enterprise
s
This message was deleted.
t
puppet code deploy terminates with an error message regarding the compiler.
Copy code
root@primary:/etc/puppetlabs/puppet# puppet code deploy -t /root/.puppetlabs/deploy_token production --wait
2022/11/09 15:33:16 ERROR - [POST /deploys][500] The deploys job failed to sync before the sync timeout was exceeded.
{
  "errored-deploys": [],
  "timeout": 300,
  "unsynced-deploys": [
    {
      "deploy-signature": "26eaff99e4d60cdf9794f2aa82f5a489fc66ded2",
      "environment": "production",
      "file-sync": {
        "code-commit": "3393d57e49f377dfb16fd4e2892cbf52810640dd",
        "environment-commit": "904b2390e212c1485d9a2b8b48259022c8f7ab66"
      },
      "id": 5,
      "status": "complete",
      "sync-clients-status": {
        "<compiler.fqdn>": {
          "cause": null,
          "status": "error"
        }
      }
    }
  ]
}
When starting from scratch we receive an error message upon running puppet infra provision compiler:
Copy code
root@primary:/etc/puppetlabs/puppet# puppet infrastructure provision compiler <compiler.fqdn> --dns-alt-names <lb fqdn>
Provisioning compiler on <compiler fqdn>. This may take several minutes.

Running enterprise_tasks::provision_compiler plan.

Starting: plan enterprise_tasks::provision_compiler
Starting: task enterprise_tasks::test_connect on <primary>
Finished: task enterprise_tasks::test_connect with 0 failures in 0.06 sec
Verify_node: <primary> verified to have the primary role.
Starting: task enterprise_tasks::check_pp_auth_role_rule on <primary fqdn>
Finished: task enterprise_tasks::check_pp_auth_role_rule with 0 failures in 1.28 sec
Starting: plan enterprise_tasks::is_subject_alt_names_allowed
Starting: task enterprise_tasks::get_conf_values on <primary fqdn>
Finished: task enterprise_tasks::get_conf_values with 0 failures in 0.35 sec
Finished: plan enterprise_tasks::is_subject_alt_names_allowed in 0.59 sec
Starting: command /opt/puppetlabs/bin/puppet config print certname --section agent on <primary fqdn>
Finished: command /opt/puppetlabs/bin/puppet config print certname --section agent with 0 failures in 1.19 sec
Starting: task enterprise_tasks::test_connect on <compiler fqdn>,<primary fqdn>
Finished: task enterprise_tasks::test_connect with 0 failures in 0.05 sec
Starting: task enterprise_tasks::disable_agent on <primary fqdn>
Finished: task enterprise_tasks::disable_agent with 1 failures in 1 min, 0 sec
Errors in task enterprise_tasks::disable_agent:
 <primary fqdn>:
  Message:
  Kind:
  Details:
   nil
Starting: task enterprise_tasks::enable_agent on <primary fqdn>
Finished: task enterprise_tasks::enable_agent with 1 failures in 0
Error: Request to https://<primary fqdn>:8143/orchestrator/v1/plan_jobs/5 failed after 0.001 seconds: Failed to open TCP connection to <primary fqdn>:8143 (Connection refused - connect(2) for "<primary fqdn>" port 8143)
Wrapped exception:
Failed to open TCP connection to <primary fqdn>:8143 (Connection refused - connect(2) for "<primary fqdn>" port 8143)
Error: Try 'puppet infrastructure help provision' for usage
c
For the sync timeout, that
<compiler.fqdn>
encountered an error that prevented it from completing the deployment. If all
pe-puppet-server
and
pe-orchestration-services
processes fail to ACK a deployment as completed within the sync timeout (default 300 seconds), then the deployment is marked as failed with
sync timeout was exceeded
.
puppetserver.log
on the errored compiler would be the spot to check for further details. That second error from
provision compiler
seems like
pe-orchestration-services
restarted on the primary in the middle of the operation --- that's the usual reason for a connection refused on port 8143.
t
A Puppet agent was running while the task tried to disable the agent. Rerunning puppet infa provision compiler solved the latest issue.
the puppetserver.log on the compiler only shows entries from starting puppetserver process. No information related to code manager
c
Hmm. That seems problematic --- should be at least some messages around fetching a new deployment. If sync activity is completely missing, then it seems like that compiler is not communicating with the primary. Which version of PE is it?
t
On the complier we dont see the file sync client service when checking with
puppet infra status
I always thought, that compilers also need the file sync client?
Customer uses PE 2021.7.1
Compiler has no File Sync Client process. But according to documentation this is a must have on the compiler. Should we set
file_sync_enabled
to true? https://puppet.com/docs/pe/2021.7/filesync_about.html#enabling_or_disabling_file_sync
SOLVED!!! We had to set the
file_sync_enabled
parameter from
"automatic"
to
true
on the PE Compiler node group
@csharpsteen ^^^
c
Hmm. Messing with file sync client state shouldn't be required. I think that's usually handled by setting
code_manager_auto_configure
to
true
?
t
code_manager_auto_configure was set according to documentation. we checked config with 5 pairs of eyes
c
Something is still off. I can't recall a time in the past 7 years where changes to
file_sync_enabled
were needed with Code Manger enabled in its default auto-configuration.
t
Does it make a difference if we configure code manager via hiera instead of PE Console?
c
It shouldn't. I usually provision test labs by setting
code_manager_auto_configre
in
pe.conf
as part of install --- which routes through Hiera.
I think that also ends up setting
code_manager_auto_configure
as a Classifier parameter if done as part of install --- which would push the setting through both configuration pathways.
t
PEBCAK! We added the data to a node hierarchy. Only primary received the information. We missed the data for the compiler.
We now have the data in pe console and everything works as expected. We are going to move the data to a better hiera level.