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

Ticket/master/3669 make puppet honor dns srv records #163

Merged
merged 3 commits into from
Nov 21, 2011
Merged

Ticket/master/3669 make puppet honor dns srv records #163

merged 3 commits into from
Nov 21, 2011

Conversation

jhelwig
Copy link
Contributor

@jhelwig jhelwig commented Oct 10, 2011

This adds two new configuration variables:

  • use_srv_records: Will attempt to lookup SRV records for hostname
    found in srv_record (default: true)
  • srv_domain: The domain that will be queried for SRV records,
    (default: $domain)

If use_srv_records is set to true, then Puppet will attempt to find
the list of servers to use from SRV records on the domain specified
via srv_domain. The CA, report, and file servers can all be specified
via independent SRV records from the SRV records to use for looking up
the catalog server.

The SRV records must be for hosts in the form:

_x-puppet._tcp.$srv_domain
_x-puppet-ca._tcp.$srv_domain
_x-puppet-report._tcp.$srv_domain
_x-puppet-fileserver._tcp.$srv_domain

If no records are found for the _x-puppet-ca, _x-puppet-report, or
_x-puppet-fileserver services, then the SRV records for the _x-puppet
service will be used. However, if records exist for any of the more
specific services, Puppet will not attempt to use the _x-puppet
service to find an applicable server, even if none of the servers for
the more specific service can be contacted.

If Puppet is unable to connect to any of the servers specified in the
SRV records, then it will attempt to connect to the "normal" servers
settable via puppet.conf.

Signed-off-by: Jacob Helwig jacob@puppetlabs.com
Signed-off-by: Daniel Pittman daniel@puppetlabs.com
Signed-off-by: Andrew Forgue andrew.forgue@gmail.com

The change from four to two space indents left some code blocks
mis-aligned.  This addresses those mis-alignments found in
test/lib/puppettest.rb.
…estoring

rspec can call the global before and after hooks in a nested fashion
around each test which will cause problems for the after hook if
$saved_indirection_State is nil (can't call fetch on nil).
@jhelwig
Copy link
Contributor Author

jhelwig commented Oct 19, 2011

Updated to move the iteration over SRV records to happen in the request object itself. This allowed removing the duplication between the file type, and the REST indirector.

This adds two new configuration variables:

  * use_srv_records: Will attempt to lookup SRV records for hostname
                     found in srv_record (default: true)

  * srv_domain: The domain that will be queried for SRV records,
                (default: $domain)

If use_srv_records is set to true, then Puppet will attempt to find
the list of servers to use from SRV records on the domain specified
via srv_domain.  The CA, report, and file servers can all be specified
via independent SRV records from the SRV records to use for looking up
the catalog server.

The SRV records must be for hosts in the form:

  _x-puppet._tcp.$srv_domain
  _x-puppet-ca._tcp.$srv_domain
  _x-puppet-report._tcp.$srv_domain
  _x-puppet-fileserver._tcp.$srv_domain

If no records are found for the _x-puppet-ca, _x-puppet-report, or
_x-puppet-fileserver services, then the SRV records for the _x-puppet
service will be used.  However, if records exist for any of the more
specific services, Puppet will not attempt to use the _x-puppet
service to find an applicable server, even if none of the servers for
the more specific service can be contacted.

If Puppet is unable to connect to any of the servers specified in the
SRV records, then it will attempt to connect to the "normal" servers
settable via puppet.conf.

Signed-off-by: Jacob Helwig <jacob@puppetlabs.com>
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Signed-off-by: Andrew Forgue <andrew.forgue@gmail.com>
@jhelwig
Copy link
Contributor Author

jhelwig commented Nov 21, 2011

Updated to bail early from Puppet::Network::Resolver.each_srv_record when the domain to use is unknown (nil/empty-string), and added tests for this.

@joshcooper joshcooper merged commit e7ec176 into puppetlabs:master Nov 21, 2011
melissa pushed a commit to melissa/puppet that referenced this pull request Mar 30, 2018
(maint) Fix default pid file path
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 this pull request may close these issues.

2 participants