Puppet not applying config but returns without error

7,282

Solution 1

you should probably rename manifests/init.pp to manifests/site.pp, as that is what you configured in puppet.conf

Solution 2

Is my.fqdn actually the signed certificate name that the master knows the agent as? Sounds like the certificate name may not match your node definition and thus it ignores the node sections.

You can try forcing the name reported by the agent to see if that does the trick:

puppet agent --test --server my.fqdn --report --certname my.fqdn

Solution 3

I don't know if this is the case on your site, but I need pluginsync = true so that some of the puppet configuration will work. Without it inside /etc/puppet/puppet.conf on the node, the puppet run will not fail, but won't do all what I expected (for example, using file_line).

I see you put it on the master puppet.conf, but check if it's on the node too.

Share:
7,282

Related videos on Youtube

Jon Skarpeteig
Author by

Jon Skarpeteig

Updated on September 18, 2022

Comments

  • Jon Skarpeteig
    Jon Skarpeteig almost 2 years

    Using Puppet 3.2.1 attempting server / client setup, running both on same host.

    I'm also using puppet-dashboard and puppetdb.

    My manifest/init.pp:

    node 'my.fqdn' {
      file { '/tmp/test':
        ensure => present
    }
    

    Running puppet agent --test --server my.fqdn --report where my.fqdn and dashboard is defined in /etc/hosts

    Yields:

    Info: Retrieving plugin
    Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
    Info: Loading facts in /etc/puppet/modules/puppi/lib/facter/puppi_projects.rb
    Info: Loading facts in /etc/puppet/modules/puppi/lib/facter/last_run.rb
    Info: Loading facts in /var/lib/puppet/lib/facter/puppi_projects.rb
    Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
    Info: Loading facts in /var/lib/puppet/lib/facter/last_run.rb
    Info: Caching catalog for my.fqdn
    Info: Applying configuration version '1369841032'
    Notice: Finished catalog run in 0.08 seconds
    Changes:
    Events:
    Resources:
              Skipped: 6
                Total: 7
    Time:
       Config retrieval: 0.42
                Total: 0.42
             Last run: 1369841033
           Filebucket: 0.00
    Version:
               Config: 1369841032
               Puppet: 3.2.1
    

    File /tmp/test is never created!

    Also;

    Puppet dashboard sais that it has no knowlengde of any nodes (E.G reports never reaching it)

    puppet.conf for reports:

    reports = store, http
    reporturl = http://puppet.armed.us/reports/upload
    

    What could be going on here, and how to fix it?

    Running puppet apply /etc/puppet/manifests/init.pp DOES work, but not when attempting to get the config from puppet master. It's like it's getting a blank catalog.

    *Edit:

    puppet.conf:

    [main]
      vardir      = /var/lib/puppet
      logdir      = /var/log/puppet
      rundir      = /var/run/puppet
      templatedir = /var/lib/puppet/templates
      ssldir      = $vardir/ssl
      usecacheonfailure = true
      user = puppet
      group = puppet
    
    [agent]
      certname = my.fqdn
      server = my.fqdn
      pluginsync = true
      report = true
      reportserver = my.fqdn
      summarize = true
      graph = true
      listen = false
      runinterval = 1800
      classfile = $vardir/classes.txt
      localconfig = $vardir/localconfig
    
    [master]
      masterport = 8140
      bindaddress = 0.0.0.0
      autosign = false
      storeconfigs = true
      environment = production
      manifest    = $confdir/manifests/site.pp
      modulepath  = /etc/puppet/modules:/usr/share/puppet/modules
      storeconfigs_backend = puppetdb
      reports = store, http
      reporturl = http://my.fqdn/reports/upload
      facts_terminus = active_record
    

    And certs:

    root@my:~# puppet cert list --all
    + "my.fqdn" (SHA256) E1:F0:29:1...:31:93:F9
    
    • Andy Shinn
      Andy Shinn about 11 years
      It would be helpful to me if you posted the puppet.conf and the output of sudo puppet cert list --all. I will update my answer with more suggestions with this info.
  • Jon Skarpeteig
    Jon Skarpeteig about 11 years
    cat /etc/hostname --> my.fqdn + facter fqdn == my.fqdn + /etc/hosts contain 127.0.1.1 my.fqdn
  • Jon Skarpeteig
    Jon Skarpeteig about 11 years
    Yes it is, otherwise you'd get an error stating that the SSL negotiation failed.
  • Jon Skarpeteig
    Jon Skarpeteig about 11 years
    report = true is in puppet.conf - and puppetmaster has read the config, while this directive is in place, yes
  • Andy Shinn
    Andy Shinn about 11 years
    Good catch. I was going to update my answer with this too after the configs were posted. I would have thought the master would post a warning or error though if it couldn't load the main site manifest...
  • Jon Skarpeteig
    Jon Skarpeteig about 11 years
    Spot on :-) Confusing without any error message though, should probably file a Puppet bug about that
  • jgoldschrafe
    jgoldschrafe about 11 years
    Cert negotiation has nothing to do with whether or not you happen to have a node defined with a particular name, though.