On 08/20/2009 06:16 PM, Michael DeHaan wrote: > On 08/20/2009 06:12 PM, Michael DeHaan wrote: >> I'm working on the 2.0 release and working on reinstating some >> features that were turned off as a result of some earlier code cleanup. >> >> So, cobbler has a few settings in /etc/cobbler/settings >> >> allow_duplicate_hostnames: 0 >> allow_duplicate_ips: 0 >> allow_duplicate_macs: 0 >> >> All of these settings are off by default (duplication not allowed) >> >> I can't think of any good idea why allowing duplication on any of >> these records is a good idea. >> >> To limit confusion of what goes in the settings file, as well as to >> simplify code and operations, and prevent people from getting into a >> "shoot foot" scenario, can anyone think of a good reason why >> duplication of any of these things should be allowed in one cobbler >> "db"? >> >> --Michael > > Also, just to be clear, the current code does /not/ enforce this on > copy operations. I'm thinking it should, but it will have side effects. > > However, if anyone /currently/ has duplicates in their config, this > would cause problems loading things and they would have to /manually/ > fix them. > > Hence while I'm asking. We can either do it when the values are set, > or when the objects are saved (in the is_valid type code). > > If duplication prevention is not to be thought of as a gun safety, > enforcing things when the value is set, and just making people /know/ > they should be careful on copy is ok, but I'd rather take the hard > line -- enforcing it every single time, so it's not possible to save > an object that has duplicate data, ever, and you can't turn off > duplicate suppression. > > Thoughts? > > This is one of those cases where my imagining of "the field" is less > than perfect and I don't want to cause too much pain for existing > users on upgrade. > > Let me know. > > --Michael > >
Hmm, looks like we *cannot* take a harder line, the way the webapp copy currently works ... because it copies the object and then allows you to edit it. However, if you try to re-save the object, at that time, you will then get the warning, as presently implemented, about the conflict(s). Anyway, question remains -- does anyone think we still need settings to turn /off/ these duplicate supression features? If not, I can remove them and simplify things for everyone (and especially new users, who will now get a lot nicer initial settings file). --Michael _______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler
