On Wednesday, October 17, 2012 9:48:16 AM UTC-7, Andy Parker wrote:

> On Wed, Oct 17, 2012 at 5:32 AM, Peter Meier 
> <[email protected]<javascript:>> 
> wrote:  

> Currently I have on my (very own) list 3 really nasty bugs, that make it 
> > really hard to rely on values of core facts (e.g.: virtual, is_virtual, 
> > ipaddress etc.) within manifest/module development, as currently they 
> are 
> > broken and we had to rollout hot-fixes or give special guidelines to 
> puppet 
> > users. 
>

For what it is worth, I think part of the challenge that Andy and his team 
face is that many of those core facts are widely used, but broken by design.

`virtual` and `ipaddress` are classic examples of that:

`virtual` is "what virtualization technology is in use on this machine", 
which becomes ... complex when, for example, I have a VMWare hosted VM than 
runs as an OpenVZ host.  Technically it is both of `virtual = vmware` *and* 
`virtual = openvzhn` at the same time, but the single value virtual fact 
can't reflect that.

`ipaddress` is almost as bad; it is the "primary" IP address of the server, 
which means "the best guess at which might matter".  There isn't a 
meaningful and universal definition of that, and it often defaults to "take 
a guess", or "the first", or whatever.  (The OSX version gets this more 
right, by using "the address attached to the interface with the default 
route."  As long as there is *the* default route, this is closer to user 
expectations.  Breaks down in any complex case (eg: multiple default 
routes, two /1 routes for VPN magic, etc.)

We can't just ditch those facts, because that would break a lot of people. 
 Things don't really work if we start returning multiple, packed values in 
the `virtual` string; code that depends on `virtual == vmware` will break 
given `virtual = vmware,openvzhn`.

You can't just ditch the attractive nuisance of "the primary" ipaddress of 
a machine, because so many people insist that this is a meaningful and 
universal property of machines, when it is really just a "best guess" no 
matter which way you slice it.  (the "DNS lookup my hostname" approach is 
just as prone to guessing wrong. :)

None of that is about bugs being ignored, but it might help explain why 
some of those bugs are so sticky...

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-dev/-/QKlIoXz9gnwJ.
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-dev?hl=en.

Reply via email to