FAQ
Hi everyone,

I've been bashing my head in the wall for several days now trying to find
out why puppet isn't loading the class from enc. I've setup the enc from
puppet-dashboard which returns:

[root@v-test-mng-01 puppet-dashboard]# /usr/bin/env
PUPPET_DASHBOARD_URL=http://v-test-mng-01:3000
/usr/share/puppet-dashboard/bin/external_node

---
- name: v-test-tst-01.domain.net
parameters: {}

classes:
- test
- name: v-test-mng-01.domain.net
parameters: {}

classes: []


however when i run puppet agent --test --debug --no-daemonize -v on
v-test-tst-01 the class is not loaded. If a look in the
/var/lib/puppet/classes.txt on the agent i only see an entry for settings,
but not the test class. Permissions to the
/usr/share/puppet-dashboard/bin/external_node are [-rwxr-xr-x 1 puppet
puppet 1453 Sep 12 04:43 /usr/share/puppet-dashboard/bin/external_node].

The test module is as fallows:

test/manifests/init.pp
class test ($var='default') {
notify {$var:}
}


The puppet config file is :

[main]

# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet

server= v-test-mng-01.domain.net
# 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
autosign=true
environment = production

[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
report = true

[master]
node_terminus = exec
external_nodes = /usr/bin/env
PUPPET_DASHBOARD_URL=http://v-test-mng-01:3000
/usr/share/puppet-dashboard/bin/external_node

ssl_client_header = SSL_CLIENT_S_D
ssl_client_verify_header = SSL_CLIENT_VERIFY
storeconfigs = true
dbadapter = mysql
dbname = puppet
dbuser = puppet
dbpassword = xxxx
dbserver = localhost
dbsocket = /var/lib/mysql/mysql.sock
reports = http,store,log
reporturl = http://localhost:3000/reports/upload


If i create the *site.pp *and add the node definition there everything
works fine.

The dashboard is on the same machine as the puppet master (v-test-mng-01 in
my case). If i run: *puppet master --configprint external_nodes*
/usr/bin/env PUPPET_DASHBOARD_URL=http://v-test-mng-01:3000
/usr/share/puppet-dashboard/bin/external_node

I'm using puppet 3.0 RC6 and dashboard 1.2.11 with Ruby 1.8.7 (2011-06-30
patchlevel 352) [x86_64-linux]


I'm running out of ideas on how to get this working so any idea or help
would be appreciated.

The output from the agent run is attached.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/sFphxgIZIycJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • R.I.Pienaar at Sep 14, 2012 at 9:54 am

    ----- Original Message -----
    From: "Cosmin-Viorel Ilie" <ilie.cosmin.viorel@gmail.com>
    To: puppet-users@googlegroups.com
    Sent: Friday, September 14, 2012 10:43:48 AM
    Subject: [Puppet Users] Puppet ignoring ENC classes

    Hi everyone,

    I've been bashing my head in the wall for several days now trying to
    find out why puppet isn't loading the class from enc. I've setup the
    enc from puppet-dashboard which returns:

    [root@v-test-mng-01 puppet-dashboard]# /usr/bin/env
    PUPPET_DASHBOARD_URL=http://v-test-mng-01:3000
    /usr/share/puppet-dashboard/bin/external_node



    ---
    - name: v-test-tst-01.domain.net
    parameters: {}

    classes:
    - test
    - name: v-test-mng-01.domain.net
    parameters: {}

    classes: []

    When puppet calls your script it will pass in the node name information
    as arguments to your script.

    Your script must then return information for just the one node requested
    so your result should be something like:

    parameters: {}
    classes:
    - test

    without node name etc

    see http://docs.puppetlabs.com/guides/external_nodes.html

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Cosmin-Viorel Ilie at Sep 14, 2012 at 10:37 am
    If i try to emulate what puppet is doing and call the script with the node
    name i get:

    [root@v-test-mng-01 puppet-dashboard]# /usr/bin/env
    PUPPET_DASHBOARD_URL=http://v-test-mng-01:3000
    /usr/share/puppet-dashboard/bin/external_node v-test-tst-01.domain.net
    ---
    name: v-test-tst-01.domain.net
    parameters: {}

    classes:
    - test


    On Friday, September 14, 2012 12:54:45 PM UTC+3, R.I. Pienaar wrote:


    ----- Original Message -----
    From: "Cosmin-Viorel Ilie" <ilie.cosm...@gmail.com <javascript:>>
    To: puppet...@googlegroups.com <javascript:>
    Sent: Friday, September 14, 2012 10:43:48 AM
    Subject: [Puppet Users] Puppet ignoring ENC classes

    Hi everyone,

    I've been bashing my head in the wall for several days now trying to
    find out why puppet isn't loading the class from enc. I've setup the
    enc from puppet-dashboard which returns:

    [root@v-test-mng-01 puppet-dashboard]# /usr/bin/env
    PUPPET_DASHBOARD_URL=http://v-test-mng-01:3000
    /usr/share/puppet-dashboard/bin/external_node



    ---
    - name: v-test-tst-01.domain.net
    parameters: {}

    classes:
    - test
    - name: v-test-mng-01.domain.net
    parameters: {}

    classes: []

    When puppet calls your script it will pass in the node name information
    as arguments to your script.

    Your script must then return information for just the one node requested
    so your result should be something like:

    parameters: {}
    classes:
    - test

    without node name etc

    see http://docs.puppetlabs.com/guides/external_nodes.html
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/BgnTUHf3KoMJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Cosmin-Viorel Ilie at Sep 17, 2012 at 9:14 am

    Any ideas on what is wrong with this setup and why the puppet master is
    not even executing the external_nodes or logging any errors ?
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/lZEwX5XsvTEJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Cosmin-Viorel Ilie at Sep 17, 2012 at 9:32 am
    After some more trial and error i've managed to get this working if i
    disabled store configs, which is strange. Maybe i'm missing something but
    there is nothing in the documentation about not using store configs with
    ENC.
    On Friday, September 14, 2012 12:43:48 PM UTC+3, Cosmin-Viorel Ilie wrote:

    Hi everyone,

    I've been bashing my head in the wall for several days now trying to find
    out why puppet isn't loading the class from enc. I've setup the enc from
    puppet-dashboard which returns:

    [root@v-test-mng-01 puppet-dashboard]# /usr/bin/env PUPPET_DASHBOARD_URL=
    http://v-test-mng-01:3000 /usr/share/puppet-dashboard/bin/external_node

    ---
    - name: v-test-tst-01.domain.net
    parameters: {}

    classes:
    - test
    - name: v-test-mng-01.domain.net
    parameters: {}

    classes: []


    however when i run puppet agent --test --debug --no-daemonize -v on
    v-test-tst-01 the class is not loaded. If a look in the
    /var/lib/puppet/classes.txt on the agent i only see an entry for settings,
    but not the test class. Permissions to the
    /usr/share/puppet-dashboard/bin/external_node are [-rwxr-xr-x 1 puppet
    puppet 1453 Sep 12 04:43 /usr/share/puppet-dashboard/bin/external_node].

    The test module is as fallows:

    test/manifests/init.pp
    class test ($var='default') {
    notify {$var:}
    }


    The puppet config file is :

    [main]

    # The Puppet log directory.
    # The default value is '$vardir/log'.
    logdir = /var/log/puppet

    server= v-test-mng-01.domain.net
    # 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
    autosign=true
    environment = production

    [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
    report = true

    [master]
    node_terminus = exec
    external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=
    http://v-test-mng-01:3000 /usr/share/puppet-dashboard/bin/external_node

    ssl_client_header = SSL_CLIENT_S_D
    ssl_client_verify_header = SSL_CLIENT_VERIFY
    storeconfigs = true
    dbadapter = mysql
    dbname = puppet
    dbuser = puppet
    dbpassword = xxxx
    dbserver = localhost
    dbsocket = /var/lib/mysql/mysql.sock
    reports = http,store,log
    reporturl = http://localhost:3000/reports/upload


    If i create the *site.pp *and add the node definition there everything
    works fine.

    The dashboard is on the same machine as the puppet master (v-test-mng-01
    in my case). If i run: *puppet master --configprint external_nodes*
    /usr/bin/env PUPPET_DASHBOARD_URL=http://v-test-mng-01:3000/usr/share/puppet-dashboard/bin/external_node

    I'm using puppet 3.0 RC6 and dashboard 1.2.11 with Ruby 1.8.7 (2011-06-30
    patchlevel 352) [x86_64-linux]


    I'm running out of ideas on how to get this working so any idea or help
    would be appreciated.

    The output from the agent run is attached.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/XKxcB8nxTdwJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Cosmin-Viorel Ilie at Sep 17, 2012 at 10:40 am
    So just in case you have the same problem:
    using :
    storeconfigs = true
    dbadapter = mysql
    dbname = puppet
    dbuser = puppet
    dbpassword = xxxx
    dbserver = localhost

    causes puppet master to ignore the ENC setting, however if i use:

    storeconfigs = true
    storeconfigs_backend = puppetdb
    and use puppetdb for storeconf everything works fine. I haven tried with
    different adapters but for mysql adapter it doesn't work. It might be an
    environment setting based on the version of gems i use ... not sure at this
    point.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/h4htjjr1OWYJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedSep 14, '12 at 9:44a
activeSep 17, '12 at 10:40a
posts6
users2
websitepuppetlabs.com

2 users in discussion

Cosmin-Viorel Ilie: 5 posts R.I.Pienaar: 1 post

People

Translate

site design / logo © 2021 Grokbase