2

A little background: I want to use puppet to fully configure RHEL6 servers freshly after they have been installed with kickstart, the kickstart itself is fully automatic and provide dhcp-enabled servers after boot, that automaticly detects its hostnames and then start puppet's agent with --certname "$(hostname -s)"

The usecase: One of the puppet's manifest steps is config network interfaces, one of which is the interface that connects server to puppetmaster. At start the server gets ip from 172.20.0.0/24 (say 172.20.0.95), where the 172.20.0.1 is a dns forwarder and gateway, and provide access to puppetmaster at FOO.intranet.com.

The problem: Once puppet reconfigure the eth0 interface and resolv.conf, everything is fine utill puppet agent want to download files from puppet:///files/*, the old dns server is not accesable anymore and it seems to trying to query this very server for the current puppetmaster domain, resulting in libc's "getaddrinfo: Name or service not known.". If I kill the agent and spawn it again, everything goes as planned.

The question: Is there any way to tell puppet agent to 'reload' after some changes? Like reload if /etc/puppet/puppet.conf was changed, or the network interfaces or anything? Otherwise I need to be sure that main NIC is configured as it should before puppet agent is started, which is a bit tricky to get it done.

1 Answers1

0

Configure the puppet service as a resource and notify it (causing a restart of the service) when the networking configuration is changed. The current puppet run will still fail, but on the next run it should work.

Alternatively, you can try having the new name servers also defined by the kickstart process in addition to the ones needed during the kickstart.

Gene
  • 3,663
  • 20
  • 39