On 11/14/2012 11:12 AM, Robinson, Eric wrote: >> It is actually worse than that: for as long as I remember RH >> has included a trap for young players where if you edit >> /etc/hosts all sorts of interesting things may happen after >> next reboot. Or rpm update. >> Depending on your choice of editor and phase of the moon. >> >> None of my RH6 machines have the hostname in /etc/hosts >> anymore anyway, all there is is localhost and localhost6. >> (And I think RHEL5 install scripts may or may not put it >> there dep. on the install mode: DVD vs netboot or something.) >> >> -- >> Dimitri Maziuk > > I only have 30 or so RHEL servers (5.X and 6.X) but they all have the > hostnames in /etc/hosts using the format... > > a.b.c.d thishost.domain.com thishost
I have 29 centos 6 servers and workstations and none of them has it. They're all a) installed off netinst, b) had valid dns records for their ips at install time, and c) I run system-config-network first thing (after 'selinux off' + reboot) to create all the hardlinks I alluded to in the previous e-mail. >> *Using the hostname* is against best practices. Reading it >> from /etc/hosts is an automatic F on unix network programming. >> > > What's the point of having... > > hosts: files,dns > > ..in nsswitch.conf if it is against best practices? I might be misunderstanding your meaning. > It's two points: 1) computers don't get names, they get numbers. If you can't use ip address, 2) consider the relationship between what you read from /etc/hosts and the reality seen by your network stack when that nsswitch.conf line reads hosts: dns, ldap If you have to have a single (no multiple ip or macs, no cname aliases) unique (no "shared" ip or rr dns) host id for your application, you better make your own and put it in your app's config file. -- Dimitri Maziuk Programmer/sysadmin BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
