I am studying a puppet and trying to experiment with it in a virtual machine at home. I am not using a puppet server yet, just working locally. It works fine, but every time I run puppet apply ... , I get a delay of a few seconds, and then displays a message
warning: Could not retrieve fact fqdn
I assume that the message is related to the delay, and I want to get rid of it (delay - I can live with the message). Googling for the solution seems to indicate that it has something to do with DNS lookups, but I can't find anything else that seems surprising. All I want is to quickly apply the manifest in my vm so that I can experiment. How can I speed up the process?
Update: I do not see additional information in the debug output, but it looks like this:
$ puppet apply -dv puppet-1.pp warning: Could not retrieve fact fqdn debug: Failed to load library 'rubygems' for feature 'rubygems' debug: Failed to load library 'selinux' for feature 'selinux' debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows is missing ...
Update: I added the tag “ruby” because the puppet has so few followers. If this does not apply to ruby, or if you know the best tag for it, let me know.
Refresh again: Having learned a little more about the puppet, I now understand that this message comes from a component called "Facter", which sniffs out "facts" about the system in which Puppet works. I found some configuration options and played with "certname" , "node_name" and "node_name_value" , but I could not get the delay to go away. Does anyone know specifically how to either tell Facter to ignore fqdn, or how to get Facter to find fqdn on Ubuntu 11.10 vm?
Progress:
$ cat /etc/resolv.conf
What is my router that runs Dnsmasq through Tomato.
$ dig -x 192.168.1.129 192.168.1.1 ; <<>> DiG 9.7.3 <<>> -x 192.168.1.129 192.168.1.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21838 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;129.1.168.192.in-addr.arpa. IN PTR ;; ANSWER SECTION: 129.1.168.192.in-addr.arpa. 0 IN PTR desk-vm-ubuntu-beta. ;; Query time: 14 msec ;; SERVER: 192.168.1.1
strace led me to arp, which was blocked for 5 seconds and called twice for each facter :
$ time arp -a ? (10.0.2.2) at 52:54:00:12:35:02 [ether] on eth0 real 0m5.127s user 0m0.004s sys 0m0.016s
I changed the VM from the NAT network to the bridge, so now it has an IP address on the network, and arp returns immediately. (I am not a network guru, so I have no idea why this worked, but it was wise to try.) But the facter still takes about 4-5 seconds to run and still reports “Failed to get fqdn fact”. facter -d shows several occurrences of "the value for the domain is still zero", up to the end. I think that is still not quite right.