Issue #10704 has been updated by Daniel Pittman.
James Turnbull wrote: > Daniel's comments seem to suggest we can work around this is in the host > parsedfile provider? Or Daniel do you mean the parser itself? No, Nigel is right: the current model is broken and needs to be replaced. This is an incompatible change, and is effectively completely replacing the `hosts` type. It is the *correct* change, of course, but that doesn't make it any less costly. My comment about the parser is related to the need to handle the malformed data that will be found in the real world, as well as to reflect the inconsistent cross-platform behaviour in the face of that malformed data. (Also, none of the proposed multi-key bits are any more correct; they break things worse, making the whole problem harder to solve in the long term.) ---------------------------------------- Bug #10704: puppet's idea of /etc/hosts management does not match real world use https://projects.puppetlabs.com/issues/10704 Author: Bill Tong Status: Accepted Priority: High Assignee: Category: host Target version: Telly Affected Puppet version: 2.7.6 Keywords: Branch: Here is a valid extract from an /etc/hosts files on a RHEL box: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 Here is the code to make puppet add these entries: host { 'localhost': ip => '127.0.0.1', host_aliases => [ 'localhost.localdomain', 'localhost4', 'localhost4.localdomain4', ], } host { 'localhost': ip => '::1', host_aliases => [ 'localhost.localdomain', 'localhost6', 'localhost6.localdomain6', ], } Notice the "localhost" part is the same in both cases. This causes a problem: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate definition: Host[localhost] is already defined in file /etc/puppet/modules/networking/manifests/init.pp puppet-2.7.6-2.el6.noarch -- 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.
