From: Kenneth W. <hap...@gm...> - 2009-12-10 23:49:41
|
Cool, very nice. Thank you! This will work fine for now. I noticed the differences between the two as a result of some issues I was having with most of my linux machines not actually returning anything on the gethostbyid() call (well, it returns a string of seven zeros). As a temporary work around for now I'm taking the motherboard serial number from dmidecode and echoing it into /etc/hostid. This gets around an issue I was having with nventory not allowing a machine to register itself because another machine already existed with the same id. Etch does not seem to care, so I run it in post ks install and it does the dmidecode hack, then puts nventory into cron. So far this has not given me any issues aside from the stale etch entries, but I've only actually moved 30 or so machines to nventory so far. On Thu, Dec 10, 2009 at 3:15 PM, Jason Heiss <jh...@ap...> wrote: > Hmm, good question. We have a cron job here that deletes any clients that > haven't updated in 30 days directly via the database. So entries with > temporary hostnames and the like fall off the end eventually. But that's a > bit of an ugly hack to be recommending to folks. Among other things we have > to keep a database username and password lying around so the cron job can > authenticate. > > nVentory, for example, goes to a great deal of trouble to try to tie a > client entry to a physical box by using values that are unique to the > system's hardware (UUID from the motherboard or MAC addresses, for example). > Thus even if a client's name changes nVentory is able to keep updating the > same entry in the database. But that's a lot of complexity to add to etch. > > Would you be satisfied with just a simple way to manually or automatically > delete these stale entries with temporary host names? > > I've gone ahead and added a few options for deleting clients. These will > all be in the next release, including a link to delete a client when viewing > it via the web UI and some additions to the REST API to make scripting > deletions easier. However, the easiest one for you to incorporate before > the next release is a rake task. To add this to your current server: > > - Grab the following file and save it as lib/tasks/etch.rake within your > server directory: > http://etch.svn.sourceforge.net/viewvc/etch/trunk/server/lib/tasks/etch.rake > - Change to the server directory and run "rake etch:dbclean[24]", which > will remove any clients which haven't checked in within the last 24 hours. > You can adjust the number of hours as desired. > > Hope that helps. > > Jason > > On Dec 9, 2009, at 3:05 PM, Kenneth Williams wrote: > > Is there a recommended way to remove hosts? > > When I PXE boot a host I'm running etch immediately in the post install. > After I assign a role to the host it's host name and ip address change. So I > end up with these stale entries in etch from the first run. > > Is there a better way for me to handle this, or should I just delete those > entries? How are others handling this? Thanks! > > -- Kenneth Williams |