Bug #2130

inconsistent value of classes when used in a template of an exported resource

Added by Christian Haase about 4 years ago. Updated about 4 years ago.

Status:AcceptedStart date:04/02/2009
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected Puppet version:0.24.8 Branch:
Keywords:

Description

I defined an exported file with an assigned template. All node information is saved in ldap. In the template I print the value of ‘classes’ in the file.

On nearby every run the content is changed without changing the classes in the ldap.

History

#1 Updated by Luke Kanies about 4 years ago

  • Status changed from Unreviewed to Needs More Information

How is it changed? Is it the same data but in a different order, or what?

#2 Updated by Luke Kanies about 4 years ago

And the ‘classes’ setting isn’t meant to just list the classes set from ldap, it’s supposed to list all classes included in the node.

#3 Updated by Christian Haase about 4 years ago

The file contains lines like these data (unimportant data removed).

the regular host data are variables like ipaddress, fqdn. the following lines are the result of an ruby function which processes ‘classes’.

The vhost-class is directly specified in the ldap node for this host, the ssh-class in specified in the parentnode

1st run:

regular host data


2nd run:

regular host data

vhost-class


3rd run:

regular host data


4th run:

regular host data

vhost-class


5th run:

regular host data


6th run:

regular host data

ssh-class vhost-class


7th run:

regular host data

vhost-class


#4 Updated by Christian Haase about 4 years ago

  • Assignee set to Luke Kanies

#5 Updated by Christian Haase about 4 years ago

I ran “while true; do puppetd -t; cat /target/dir/* | wc -l | tee -a count.log; done” for a while.

the result was this:

cat count.log | sort | uniq -c

 14 613
 23 618
 27 623
 10 628
  4 638
 20 643
 25 648
 18 653

and

cat count.log | uniq -c

  1 623
  1 643
  1 623
  1 643
  1 648
  1 618
  1 623
  1 648
  1 643
  1 618
  5 648
  1 618
  1 623
  1 648
  1 623
  1 618
  2 648
  1 618
  1 623
  1 648
  2 613
  1 643
  1 638
  1 643
  1 618
  1 643
  1 613
  1 643
  1 618
  2 643
  2 618
  1 613
  1 618
  2 613
  1 643
  1 618
  1 643
  1 613
  2 618
  1 613
  2 618
  2 643
  1 613
  2 643
  1 638
  2 613
  1 638
  1 643
  2 618
  2 643
  1 613
  1 638
  2 613
  2 618
  2 643
  1 623
  1 648
  1 653
  1 628
  1 653
  1 623
  2 653
  3 623
  1 628
  1 653
  1 623
  1 653
  3 623
  1 648
  1 623
  1 653
  1 648
  1 623
  1 653
  2 648
  1 653
  1 628
  1 653
  1 628
  1 623
  1 628
  1 653
  1 648
  1 653
  1 623
  1 628
  1 653
  1 648
  1 653
  1 628
  1 653
  1 623
  1 628
  1 648
  3 623
  2 628
  3 653
  1 648
  1 618
  1 623
  1 618
  1 648
  1 623
  1 618
  1 648
  1 623
  3 648
  1 623
  1 618
  1 648
  1 623

#6 Updated by Christian Haase about 4 years ago

Does this Bug really need more information? What is still required?

#7 Updated by Luke Kanies about 4 years ago

  • Status changed from Needs More Information to Accepted
  • Assignee changed from Luke Kanies to Puppet Community

The ‘classes’ file isn’t just the list of classes from the node, it’s supposed to be the list of all classes evaluated on the node at all.

#8 Updated by Christian Haase about 4 years ago

  • Affected Puppet version changed from 0.24.7 to 0.24.8

I found a way to omit the effect by changing the default of the lazy_evaluate parameter of the function evaluate_classes in /usr/lib/ruby/1.8/puppet/parser/compiler.rb to false.

The effect can be broken down to the value of scope.catalog.classes

#9 Updated by James Turnbull about 4 years ago

  • Assignee deleted (Puppet Community)

Also available in: Atom PDF