On 10/08/2014 10:34 PM, Charlie Sharpsteen wrote:
> On Wednesday, October 8, 2014 11:51:32 AM UTC-7, John Bollinger wrote:
>
>
>
> On Wednesday, October 8, 2014 6:55:19 AM UTC-5, Felix Frank wrote:
>
> package { 'mysql-gem': package_name => mysql, provider => gem }
>
> ...which is awful I guess. Anyway, relationship targets will not be
> jeopardized (that I can see).
>
>
>
> It is more than awful. It either overloads the package title in
> dangerous ways, or else it deeply undermines Puppet's protections
> against duplicate resources. Consider, what is the meaning of this:
>
> package { 'mysql-gem': package_name => 'mysql', provider => 'yum' }
> ?
Sorry, I should have been more clear. The resource title is supposed to
be arbitrary here. These manage the same resource:
package { 'mysql-gem': package_name => 'mysql', provider => 'gem' }
package { 'mysql-foo': package_name => 'mysql', provider => 'gem' }
package { 'apache': package_name => 'mysql', provider => 'gem' }
> Does it duplicate any or all of these resources?
>
> package { 'mysql-yum': package_name => 'mysql', provider => 'yum' }
> package { 'mysql-rpm': package_name => 'mysql', provider => 'rpm' }
> package { 'mysql-gem': package_name => 'mysql' }
> ?
Only titles clash, so these three could share one catalog. If yum is
your default provider, then the first and third do manage the same resource.
> To me, this proposal seams like the most pragmatic way to alleviate the
> problem without a major retool of how the Package type works. At the
> moment, I'm not convinced that opening up the possibility of accidental
> misuse outweighs the current issues surrounding the workarounds people
> have to use in order to install a package and a gem that happen to share
> the same name.
Thanks for this summary Charlie, it mirrors my feeling quite exactly.
If we open Pandora's box, users will have ample new opportunity to shoot
their own feet. I don't think that there can be a solution that prevents
abuse in the form of conflicting resources, but we do allow a use case
that we know is problematic for several if not many users.
So in response to Andy's request for a pick, I feel that making packages
non-isomorphic and allow namevar != title would be a fair compromise.
package { 'mysql-foo': name => 'mysql', provider => 'gem' }
Yes this might get abused by Forge modules. Nothing we can do about
that, as far as I can tell.
Cheers,
Felix
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/543697D3.8010207%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.