From: Jason H. <jh...@ap...> - 2009-12-10 23:15:31
|
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! |