| Puppet::Confine has tries to prevent a type of confine from being defined twice (Eg. Puppet::Confine::Foo and Puppet::Confine::Bar::Foo), because of how it uses the last part of the namespace as the name of the type of confine. This same check at inheritance time is used to register a confine to be able to be used later. Unfortunately, the way this is done also prevents using inheritance from de-duplicating any confinement code. Where the duplicate check & registration happens: https://github.com/puppetlabs/puppet/blob/81ad86c0f7a0e7f4c4d351c83c250fd795869586/lib/puppet/confine.rb#L14-L21 We might need to change how confine types are registered, or at least make sure that we're only looking at leaf nodes in the inheritance chain when doing this check. |