*puppet.conf on master *
[main]
    # The Puppet log directory.
    # The default value is '$vardir/log'.
    logdir = /var/log/puppet

    # Where Puppet PID files are kept.
    # The default value is '$vardir/run'.
    rundir = /var/run/puppet

    # Where SSL certificates are kept.
    # The default value is '$confdir/ssl'.
    ssldir = $vardir/ssl
    certname = puppet
    dns_alt_names = puppetmaster.mydomain.com, puppetdb.mydomain.com

     pluginsync = true
     autosign = true

node_terminus  = exec
external_nodes =  /usr/bin/env PUPPET_DASHBOARD_URL=
http://puppetadmin:myp...@puppetdb.mydomain.com:3000
/usr/share/puppet-dashboard/bin/external_node

reports = store, http
reporturl =
http://puppetadmin:myp...@puppetdb.mydomain.com:3000/reports/upload
storeconfigs = true
storeconfigs_backend = puppetdb
usecacheonfailure = false




*working puppet.conf on agent after your suggestion*[main]
    # The Puppet log directory.
    # The default value is '$vardir/log'.
    logdir = /var/log/puppet

    # Where Puppet PID files are kept.
    # The default value is '$vardir/run'.
    rundir = /var/run/puppet

    # Where SSL certificates are kept.
    # The default value is '$confdir/ssl'.
    ssldir = $vardir/ssl
server = myagent.mydomain.com
certname = myagentcertname
report = true

[agent]
    # The file in which puppetd stores a list of the classes
    # associated with the retrieved configuratiion.  Can be loaded in
    # the separate ``puppet`` executable using the ``--loadclasses``
    # option.
    # The default value is '$confdir/classes.txt'.
    classfile = $vardir/classes.txt

    # Where puppetd caches the local configuration.  An
    # extension indicating the cache format is added automatically.
    # The default value is '$confdir/localconfig'.
    localconfig = $vardir/localconfig


The files above are my current master and agent configs, I have updated the
agent config after your suggestion and it seems to be working great...

But now I will need to update my puppet agent config(for the above change
and to include postrun_command for "puppet facts upload") on almost 2000
agents.. I understand that I can do it via puppet itself but each server
has a different certname

I guess.. I will need to use templates... but is it correct that any change
to puppet.conf is parsed immediately and does not require a restart.

Thanks a lot for your help once again..

Regards,

Rakesh K.



On Thu, Jun 12, 2014 at 5:54 PM, Ken Barber <k...@puppetlabs.com> wrote:

> > first of all thanks a ton for the great help.
>
> No problem, I'm glad Deepak chimed in about 'facts upload' its a much
> better way to do it.
>
> > It seems there is some issue with the  "puppet facts upload" command"
> >
> > I already have the certname & server configuration directives declared in
> > the puppet.conf but for some reason the same are not being recognized by
> the
> > puppet facts command
> >
> > When I am trying to run
> > # puppet facts upload
> > ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> > password: NO)
>
> This is a mysql error ... btw. Let see your puppet.conf on the agent
> your testing on, it looks almost as if you have same old storeconfig
> setups remaining somewhere. Check in particular for db* style settings
> ...
>
> > ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> > password: NO)
> > Error: getaddrinfo: Name or service not known
> > Error: Try 'puppet help facts upload' for usage
> >
> > But when I try to run
> > # puppet facts upload --server="puppet_master_server"
> > --certname="agent_certname"
> > ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> > password: NO)
> > ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> > password: NO)
> > Notice: Uploaded facts for 'agent_certname'
> >
> > Also I tried to use the postrun_command within the puppet.conf on the
> client
> > node but I end up getting the same error.
>
> Yeah, I'll need to see the puppet.conf on the agent you are trying to
> run the facts upload specifically. Remember 'puppet facts upload'
> doesn't use your [agent] section (its not an agent is it?), so you
> might need to specify the server in your [main].
>
> ken.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAE4bNTnCZJR_z7hWJeZbAhmbKREp6rz%2BUJ73c3%2B0fZZYQ3ZYng%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEJrXMU2YQ%2BWgm%2BSru0wdhr_642YuKDGpobTqqgPnZRFRgNGSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to