Issue #13349 has been updated by Chris Price.

Category changed from modules to language
Status changed from Re-opened to Accepted
Priority changed from Normal to High
Target version set to Telly

Wow, no.  That is definitely a bug.

It appears to have been introduced in 2.6.3, the following commit:


commit 65ef24e5c1c33b7d42012891d368917fd6aaf68c
Author: Paul Berry <[email protected]>
Date:   Fri Oct 8 15:26:28 2010 -0700

    (#4534/#4778) -- Normalize parameterized classes
    
    This is a reconciliation/melding of Paul's
        (#4534) Class inheritance with parameterized classes is no longer 
ignored
    and Markus's
        Fix for #4778 -- evaluate parameterized classes when they are 
instantiated
    
    Extracted the code from Resource::Type#mk_plain_resource that evaluates
    parents and tags the catalog, and moved that into a new method called
    instantiate_resource.  Instantiate_resource is now also called from
    Parser::Ast::Resource#evaluate, so that the notation
    
        "class { classname: }"
    
    now executes this code too.  Likewise adds class evaluation so that it 
behaves
    the same (with regard to lazy / strict evaluation) as
    
        include classname

----------------------------------------
Bug #13349: Odd search order for manifests when names partially match
https://projects.puppetlabs.com/issues/13349#change-59023

Author: Mark Dixon
Status: Accepted
Priority: High
Assignee: 
Category: language
Target version: Telly
Affected Puppet version: 2.7.11
Keywords: 
Branch: 


I find that if I try and include manifest `bar::something` from within 
`foo::test`, puppet preferentially finds `foo::bar::something` instead of 
`bar::something`. Puppet 2.7.11.

Please consider the following puppet code which demonstrates this:

<PRE>
$ cat test.pp
class { 'foo::test': }

class foo::test {
   class { 'bar::something': }
}

# /.*bar::something/ manifests

# - This is the one I thought I'd get
class bar::something {
   notify { 'peep peep!': withpath => true }
}

# - This is the one that "wins"
class foo::bar::something {
   notify { 'poop poop!': withpath => true }  
}
</PRE>

Running it gives:
<PRE>
$ puppet apply test.pp
notice: /Stage[main]/Foo::Bar::Something/Notify[poop poop!]/message: poop poop!
notice: /Stage[main]/Foo::Bar::Something/Notify[poop poop!]/message: defined 
'message' as 'poop poop!'
notice: Finished catalog run in 0.05 seconds
</PRE>

Is this a bug?

Thanks,

Mark


-- 
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