FAQ
I've got an exported exec that looks like:

38 @@exec { "commvault_subclient_$hostname":
39 command => "/usr/local/sbin/commvault_auto_subclient
--touchstamp /srv/mnt/.$hostname_commvault_backed_up $hostname",
40 creates => "/srv/mnt/.$hostname_commvault_backed_up",
41 tag => "commvault_nfs_subclient"
42 }

Elsewhere I've got some manifest to collect these:

90 # Collect the exec's that automatically setup commvault backups
91 Exec <<| tag == 'commvault_nfs_subclient' |>>
92


But on the host that has that collection, I'm not seeing the resulting
script run (which creates the file mentioned as the --touchstamp
argument). It's like the collection is silently failing.

I'm not sure how to debug this. Other exported resources are working,
I'm successfully doing:
@@nagios_host { $hostname:
address => $ipaddress,
use => 'linux-host',
alias => $hostname,
}
@@nagios_service { "$hostname-ping":
use => 'alive-service',
host_name => $hostname,
}

And collecting them with:
Nagios_service <<| |>>
Nagios_host <<| |>>

I'm also seeing in my mysql database entries in the 'resources' table
that have restype='Exec' and have a title like commvault_subclient_webapp01.

I'm running puppet 2.6.2 on the master and the involved clients. Any
suggestions?

Cheers,
Geoff Crompton

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Jcbollinger at Nov 26, 2012 at 4:02 pm

    On Sunday, November 25, 2012 11:57:36 PM UTC-6, go8ose wrote:
    I've got an exported exec that looks like:

    38 @@exec { "commvault_subclient_$hostname":
    39 command => "/usr/local/sbin/commvault_auto_subclient
    --touchstamp /srv/mnt/.$hostname_commvault_backed_up $hostname",
    40 creates => "/srv/mnt/.$hostname_commvault_backed_up",
    41 tag => "commvault_nfs_subclient"
    42 }

    Elsewhere I've got some manifest to collect these:

    90 # Collect the exec's that automatically setup commvault backups
    91 Exec <<| tag == 'commvault_nfs_subclient' |>>
    92


    But on the host that has that collection, I'm not seeing the resulting
    script run (which creates the file mentioned as the --touchstamp
    argument). It's like the collection is silently failing.

    I'm not sure how to debug this. Other exported resources are working,
    I'm successfully doing:
    @@nagios_host { $hostname:
    address => $ipaddress,
    use => 'linux-host',
    alias => $hostname,
    }
    @@nagios_service { "$hostname-ping":
    use => 'alive-service',
    host_name => $hostname,
    }

    And collecting them with:
    Nagios_service <<| |>>
    Nagios_host <<| |>>

    I'm also seeing in my mysql database entries in the 'resources' table
    that have restype='Exec' and have a title like
    commvault_subclient_webapp01.

    I'm running puppet 2.6.2 on the master and the involved clients. Any
    suggestions?
    This looks like http://projects.puppetlabs.com/issues/11049. You can vote
    for that issue. To work around the it, I think you'll need to arrange for
    the host that collects those resources to declare its own nagios_service
    and nagios_host resources as ordinary instead of exported resources. Of
    course, that's a bust if more than one node needs to collect those
    resources.

    There are probably other workarounds, but they depend on details of your
    site. Many of them involve substituting something else for exported
    resources; the rest involve collecting onto a node that does not export
    (and therefore is not affected by the bug), and then sharing the result
    somehow.


    John

    --
    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/-/MG_5-Jtrp4EJ.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Go8ose at Nov 28, 2012 at 2:55 am

    On Tuesday, November 27, 2012 2:56:45 AM UTC+11, jcbollinger wrote:
    This looks like http://projects.puppetlabs.com/issues/11049. You can
    vote for that issue. To work around the it, I think you'll need to arrange
    for the host that collects those resources to declare its own
    nagios_service and nagios_host resources as ordinary instead of exported
    resources. Of course, that's a bust if more than one node needs to collect
    those resources.

    There are probably other workarounds, but they depend on details of your
    site. Many of them involve substituting something else for exported
    resources; the rest involve collecting onto a node that does not export
    (and therefore is not affected by the bug), and then sharing the result
    somehow.


    John
    Thanks for the reply John. I think the bug report you mention (but 11049)
    isn't relevant for my situation. Perhaps I shouldn't have mentioned my
    working nagios resources in my original post. They aren't part of my
    problem, they are just illustrating that I have some exported resources and
    collection working.

    In my situation I want to collect the exec's on a different host to the
    hosts that are exporting these execs. I've got some working exports (the
    nagios ones, and some local definitions involving NFS mounts), but my exec
    exports aren't working, and I don't know why.

    Cheers,
    Geoff

    --
    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/-/lNbGegRSGkYJ.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Jcbollinger at Nov 28, 2012 at 2:40 pm

    On Tuesday, November 27, 2012 8:55:47 PM UTC-6, go8ose wrote:
    On Tuesday, November 27, 2012 2:56:45 AM UTC+11, jcbollinger wrote:


    This looks like http://projects.puppetlabs.com/issues/11049. You can
    vote for that issue. To work around the it, I think you'll need to arrange
    for the host that collects those resources to declare its own
    nagios_service and nagios_host resources as ordinary instead of exported
    resources. Of course, that's a bust if more than one node needs to collect
    those resources.

    There are probably other workarounds, but they depend on details of your
    site. Many of them involve substituting something else for exported
    resources; the rest involve collecting onto a node that does not export
    (and therefore is not affected by the bug), and then sharing the result
    somehow.


    John
    Thanks for the reply John. I think the bug report you mention (but 11049)
    isn't relevant for my situation. Perhaps I shouldn't have mentioned my
    working nagios resources in my original post. They aren't part of my
    problem, they are just illustrating that I have some exported resources and
    collection working.

    In my situation I want to collect the exec's on a different host to the
    hosts that are exporting these execs.

    So you're saying that *none* of the collected Execs are running? In that
    case, check the cached catalog to see whether it contains those Execs at
    all. That will establish whether it is a problem with resource collection
    or with the individual resources. It should also allow you to verify the
    resource parameters.

    As for the individual resources, you would be well advised to use curly
    brackets around variable names inside strings. Especially, you should use
    them in "/srv/mnt/.${hostname}_commvault_backed_up" and similar strings
    (else Puppet will think you want the variable named
    $hostname_commvault_backed_up), but it's a good habit to use curly brackets
    in every variable reference.

    Actually, the brackets are probably your issue: you presumably don't define
    a variable named $hostname_commvault_backed_up, so it interpolates as
    nothing. That means what you've written is equivalent to "creates =>
    '/srv/mnt/.'", which is in turn equivalent to "creates => '/srv/mnt'".
    Since that directory already exists, applying the Execs will not result in
    their commands running.


    John

    --
    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/-/57dgbGqke24J.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Go8ose at Nov 29, 2012 at 6:01 am

    On Thursday, November 29, 2012 1:40:01 AM UTC+11, jcbollinger wrote:
    So you're saying that *none* of the collected Execs are running? In that
    case, check the cached catalog to see whether it contains those Execs at
    all. That will establish whether it is a problem with resource collection
    or with the individual resources. It should also allow you to verify the
    resource parameters.

    As for the individual resources, you would be well advised to use curly
    brackets around variable names inside strings. Especially, you should use
    them in "/srv/mnt/.${hostname}_commvault_backed_up" and similar strings
    (else Puppet will think you want the variable named
    $hostname_commvault_backed_up), but it's a good habit to use curly brackets
    in every variable reference.

    Actually, the brackets are probably your issue: you presumably don't
    define a variable named $hostname_commvault_backed_up, so it interpolates
    as nothing. That means what you've written is equivalent to "creates =>
    '/srv/mnt/.'", which is in turn equivalent to "creates => '/srv/mnt'".
    Since that directory already exists, applying the Execs will not result in
    their commands running.
    Of course! Thanks for that John, you are correct. I was having these
    problems because I hadn't used braces in the use of the variable. When I
    changed that, I got the behaviour I expected.

    Thanks!
    Geoff

    --
    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/-/q_xaX5fPFBwJ.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    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
postedNov 26, '12 at 5:57a
activeNov 29, '12 at 6:01a
posts5
users2
websitepuppetlabs.com

2 users in discussion

Go8ose: 3 posts Jcbollinger: 2 posts

People

Translate

site design / logo © 2023 Grokbase