Bug #2230

Puppetmaster not collecting exported resources

Added by David Escala about 3 years ago. Updated about 2 years ago.

Status:Closed Start date:05/07/2009
Priority:Normal Due date:
Assignee:David Escala % Done:

0%

Category:plumbing
Target version:0.25.0
Affected Puppet version:0.25.0 Branch:
Keywords:
Votes: 0

Description

If you upgrade puppetmasterd to 0.25.0beta1 exported resources are not collected. If you change it back to 0.24.8 exported resources are collected again.

Relevant configuration:

  • clients from 0.24.3 to 0.24.8.
  • storeconfigs = true
  • dbadapter = mysql
  • database with latest schema
  • not using async_storeconfigs
  • ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-linux]
  • activerecord 2.3.2

Let me know if you need more information or if you think I am missing something.

History

Updated by James Turnbull about 3 years ago

  • Category set to plumbing
  • Status changed from Unreviewed to Needs More Information

Do the logs reveal anything with —debug —trace?

Updated by David Escala about 3 years ago

It says:

notice: Compiled catalog for orinador.escala.local in 1.35 seconds
info: Caching catalog for orinador.escala.local
debug: Searched for resources in 0.04 seconds
debug: Searched for resource params and tags in 0.12 seconds
debug: Resource removal in 0.46 seconds
debug: Resource merger in 0.13 seconds
debug: Added resources(tags) in 0.00 seconds
debug: Added resources(parameters) in 0.00 seconds
debug: Added resources(initialization) in 0.00 seconds
debug: Resource addition in 0.64 seconds
debug: Performed resource comparison in 1.23 seconds
debug: Saved catalog to database in 1.52 seconds
debug: Allowing authenticated client orinador.escala.local(127.0.0.1) access to fileserver.describe

After this first run with 0.25, exported resources for the host are deleted:

mysql> select * from resources where exported is not null and host_id=141;
Empty set (0.01 sec)

Updated by Luke Kanies about 3 years ago

  • Status changed from Needs More Information to Accepted
  • Assignee set to Luke Kanies
  • Target version set to 0.25.0

Updated by Luke Kanies almost 3 years ago

Hmm, I have unfortunately reproduced this.

It was working very recently, but I guess it’s broken again somehow.

Updated by Brice Figureau almost 3 years ago

I think I found the issue. When we convert a Puppet::Parser::Resource to a Puppet::Resource we don’t copy over the exported attribute, so we write/update the database with exported=NULL for this resource, so no host is able to collect it.

Patch available in my github repository, branch tickets/master/2230: http://github.com/masterzen/puppet/tree/tickets/master/2230

Updated by Luke Kanies almost 3 years ago

  • Status changed from Accepted to Ready For Checkin
  • Assignee changed from Luke Kanies to James Turnbull

Fixed in the tickets/master/2230 branch in my repo.

Updated by James Turnbull almost 3 years ago

  • Status changed from Ready For Checkin to Closed

Pushed in commit:f1dba91bbde7919cb0a0fd412faacb1f7dd2c84d in branch master.

Updated by David Escala almost 3 years ago

  • Status changed from Closed to Re-opened

Sorry to re-open this, but I have tested your patch and it does not solve the problem. What did change, in the database, instead of resources with exported=NULL we have resources with exported=0.

Note that exported resources are not stored in the database, as opposed to stored with exported set to false.

Updated by James Turnbull almost 3 years ago

  • Assignee changed from James Turnbull to Luke Kanies

Updated by Luke Kanies almost 3 years ago

  • Status changed from Re-opened to Closed
  • Assignee changed from Luke Kanies to David Escala

I can’t reproduce this:

13|foo|Notify|2|1|t|6|2009-06-11 17:30:14|2009-06-11 17:30:14
14|foo|Notify|1|2|f|6|2009-06-11 17:30:17|2009-06-11 17:30:17

That’s an exported resource, one for the exporting host (thus, it’s exported), one for the collecting host (thus, not exported).

This is in the HEAD of master. If you just applied a single patch, you probably didn’t have complete code. Please try against HEAD and reopen if there’s a problem.

Also available in: Atom PDF