Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puppetdb.conf for "PE Compiler Group B" contains 3 entries when HA is enabled #118

Closed
jarretlavallee opened this issue Aug 26, 2020 · 1 comment · Fixed by #120
Closed

Comments

@jarretlavallee
Copy link

jarretlavallee commented Aug 26, 2020

Describe the Bug

Using the XL with HA architecture, the puppetdb.conf on the compilers in PE Compiler Group B has the certname, master, and replica in the server_list. Since command_broadcast is enabled, the commands will be sent to two PuppetDB instances using the same PostgreSQL instance, increasing load and potentially causing contention without any benefit.

Example:

[main]
server_urls = https://pe-201980-compile-02.puppetdebug.vlan:8081,https://pe-201980-master.puppetdebug.vlan:8081,https://pe-201980-replica.puppetdebug.vlan:8081
command_broadcast = true

Expected Behavior

The puppetdb.conf should only have the certname, and master in the server_list for compilers in PE Compiler Group B.

Steps to Reproduce

  1. Provision PE 2019.2.0+ PE XL with HA
  2. Log into a compiler in PE Compiler Group B
  3. Observe the /etc/puppetlabs/puppet/puppetdb.conf has three entries in the server_list.

Environment

  • Version: 2.1.1
  • Platform: Any. Tested in EL 7

Additional Context

This happens because $puppet_enterprise::ha_enabled_replicas is automatically merged with the puppetdb_host in puppet_enterprise::profile::master::puppetdb due to PE-27165.

The proposed workaround is to set the following in the enterprise/conf.d/nodes/*.conf, hiera, or console data only for the compilers.

puppet_enterprise::profile::master::puppetdb::ha_enabled_replicas: []
@jarretlavallee
Copy link
Author

This also duplicates the replica's entry in the server_urls for compilers in PE Compiler Group A

server_urls = https://pe-201980-compile-01.puppetdebug.vlan:8081,https://pe-201980-replica.puppetdebug.vlan:8081,https://pe-201980-replica.puppetdebug.vlan:8081

reidmv added a commit that referenced this issue Sep 10, 2020
Set ha_enabled_replicas to an empty array for compilers only. We are
already supplying the specific certnames that compilers' PuppetDB
terminus configuration should use.
trlinkin pushed a commit that referenced this issue Sep 15, 2020
Set ha_enabled_replicas to an empty array for compilers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant