Skip to content

agent's puppet.conf contains incorrect master hostname if fqdn hostnames are used #44

@jessereynolds

Description

@jessereynolds

I would like to use qualified domain names as the vm names in my puppet environment so that I can use puppet to update /etc/hosts on my mac (using vagrant hosts puppetize | sudo puppet apply) and have each environment not stomp on each other. Also, it's a better simulation of real world setups.

I've tried doing this:

vagrant oscar init
vagrant oscar init-vms \
  --master master.workflow.example=puppetlabs/centos-6.6-64-nocm \
  --agent  git.workflow.example=puppetlabs/centos-6.6-64-nocm \
  --agent  agent1.workflow.example=puppetlabs/centos-6.6-64-nocm \
  --pe-version 2015.2.0
# hack in iptables disabling shell provisioners to config/roles.yaml
# increase memory allocation of master from 1GB to 3GB
vagrant up

This does along OK until an agent tries to do a puppet run. You get a certificate mismatch error:

[root@agent1 ~]# puppet agent -t
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Server hostname 'master' did not match server certificate; expected one of master.workflow.example, DNS:master.workflow.example, DNS:puppet
Info: Retrieving pluginfacts
Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': Server hostname 'master' did not match server certificate; expected one of master.workflow.example, DNS:master.workflow.example, DNS:puppet
Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: Server hostname 'master' did not match server certificate; expected one of master.workflow.example, DNS:master.workflow.example, DNS:puppet
Info: Retrieving plugin
Error: /File[/opt/puppetlabs/puppet/cache/lib]: Failed to generate additional resources using 'eval_generate': Server hostname 'master' did not match server certificate; expected one of master.workflow.example, DNS:master.workflow.example, DNS:puppet
Error: /File[/opt/puppetlabs/puppet/cache/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: Server hostname 'master' did not match server certificate; expected one of master.workflow.example, DNS:master.workflow.example, DNS:puppet
Error: Could not retrieve catalog from remote server: Server hostname 'master' did not match server certificate; expected one of master.workflow.example, DNS:master.workflow.example, DNS:puppet
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: Server hostname 'master' did not match server certificate; expected one of master.workflow.example, DNS:master.workflow.example, DNS:puppet

I can workaround this by updating the server address in /etc/puppetlabs/puppet/puppet.conf from master to master.workflow.example

Am I doing this all wrong? How else can you set up vms with qualified domain names as hostnames?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions