trouble diagnosing exported resources

198 views
Skip to first unread message

Marc Fournier

unread,
Mar 11, 2009, 9:38:46 AM3/11/09
to puppet...@googlegroups.com
Hello,

I want to use exported resources (namely sshkey) and with the following
code, each node gets his own ssh key written into /etc/ssh/ssh_known_hosts,
but not the others ones. This is with puppet 0.24.7 on redhat.

node 'node1' {
@@sshkey { "node1":
type => rsa,
key => $sshrsakey
}
Sshkey <<| |>>
}

node 'node2' {
@@sshkey { "node2":
type => rsa,
key => $sshrsakey
}
Sshkey <<| |>>
}

...

I have this working as expected on another set of hosts (debian with puppet
0.24.7).

When I compare the output of puppetmaster logs with --debug, I obtain this
on the working one:
debug: Scope(Node[node1]): Collected 1 Sshkey resource in 0.06 seconds

And this where exported resources don't work:
debug: Scope(Node[node1]): Collected 1 Sshkey resources in 0.00 seconds
debug: Scope(Node[node1]): Collected 0 Sshkey resources in 0.00 seconds

Another significant difference I noticed so far is that this query returns
no rows on the puppetmaster which doesn't work as expected:
SELECT * FROM `resources` WHERE (exported=1);

I'm seeking pointers on how the exported resource storage mechanism works,
how to track down what's misbehaving in my case. Any idea why the
collect_exported function in collector.rb seems to be running twice ?

Thanks !
Marc

Todd Zullinger

unread,
Mar 11, 2009, 9:49:47 AM3/11/09
to puppet...@googlegroups.com
Marc Fournier wrote:
> I want to use exported resources (namely sshkey) and with the
> following code, each node gets his own ssh key written into
> /etc/ssh/ssh_known_hosts, but not the others ones. This is with
> puppet 0.24.7 on redhat.
[...]

> When I compare the output of puppetmaster logs with --debug, I
> obtain this on the working one:
> debug: Scope(Node[node1]): Collected 1 Sshkey resource in 0.06 seconds
>
> And this where exported resources don't work:
> debug: Scope(Node[node1]): Collected 1 Sshkey resources in 0.00 seconds
> debug: Scope(Node[node1]): Collected 0 Sshkey resources in 0.00 seconds

I think this is http://projects.reductivelabs.com/issues/show/1884.
It was fixed in commit 32c2be9.

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The surest sign that intelligent life exists elsewhere in the universe
is that it has never tried to contact us.
-- Bill Watterson (Calvin and Hobbes)

Marc Fournier

unread,
Mar 11, 2009, 10:43:44 AM3/11/09
to puppet...@googlegroups.com
On Wed, 11 Mar 2009 09:49:47 -0400
Todd Zullinger <t...@pobox.com> wrote:

> Marc Fournier wrote:
> > I want to use exported resources (namely sshkey) and with the
> > following code, each node gets his own ssh key written into
> > /etc/ssh/ssh_known_hosts, but not the others ones.
> >

> I think this is http://projects.reductivelabs.com/issues/show/1884.
> It was fixed in commit 32c2be9.
>

That's exactly this bug. Thanks a lot !

Marc

Reply all
Reply to author
Forward
0 new messages