Issue #7823 has been updated by Jeff McCune.

Assignee set to Nigel Kersten
Priority changed from Immediate to Normal

Nigel, could you please review and set priority?

Thanks,
-Jeff
----------------------------------------
Bug #7823: Puppet variables in templates are intermittently unset
https://projects.puppetlabs.com/issues/7823

Author: Jeff McCune
Status: Unreviewed
Priority: Normal
Assignee: Nigel Kersten
Category: templates
Target version: 2.6.x
Affected Puppet version: 2.6.7
Keywords: template variable scope unset blank
Branch: 


# Impact data #

This affected a large, paying customer today.  It is an ongoing issue and I 
haven't isolated the root cause or figured out how to reliably reproduce the 
issue.  It does happen often on their systems, however.

This also appears to be affecting other puppet users as reported on the users 
mailing list:

  * [Module variables missing during some puppet 
runs](http://groups.google.com/group/puppet-users/browse_thread/thread/86cb0dd6c6e074c4/f240c923cac01bf2?lnk=gst&q=template#f240c923cac01bf2)

# Overview #

Working with a Puppet 2.6.7 master, I'm noticing templates _sometimes_ do not 
provide access to Puppet DSL variables.  Consider the following template:

    <%
    enable_pluginsync  = scope.lookupvar('enable_pluginsync')  || 'true'
    puppet_server_real = scope.lookupvar('puppet_server_real') || 'puppet'
    puppetversion      = scope.lookupvar('::puppetversion')    || '0.24.8'
    -%>
    # Puppet Version: [<%= puppetversion %>]
    <% if puppetversion =~ /^0.2/ -%>
    [puppetd]
    <% else -%>
    [agent]
    <% end -%>
    ssldir = /etc/puppet/ssl
    <% if enable_pluginsync then -%>
    factpath   = $libdir
    pluginsync = true
    <% end -%>
    certname      = jeff
    server        = <%= puppet_server_real %>

The problem I'm seeing is that _sometimes_ puppetversion is the empty string 
(not nill) and as a result the regular expression check fails.  This causes the 
puppet.conf file to have an agent block rather than a puppetd block and orphans 
all 0.24.8 nodes since agent is not a valid configuration section.

# Expected Behavior #

Puppet DSL variables should always be accessible.

# Actual Behavior #

Puppet DSL variables are not always accessible.

# Steps to reproduce #

TBD.  I'm currently working on a way to reproduce this in a way I can easily 
convey to the R&D team.  In the meantime, is remote desktop access feasible?

I know this affects 2.6.7 and 2.6.8 has been reported on the puppet-users list. 
 I'm not sure if earlier versions are affected.




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to