Host sometimes Succeeds with Empty Output
martin at dc.cis.okstate.edu
Fri Sep 14 14:48:59 UTC 2012
I needed to delete the CNAME record of
physicscourses.okstate.edu. After the deletion, the host command
would silently exit successfully as if this alias was still
there. I have seen this behavior a few times before but am not
sure what triggers it as one normally gets the usual "host
whatever.com not found" and host exits non zero.
If I specifically command
host -tCNAME physicscourses.okstate.edu
I receive that there is no CNAME record named
physicscourses.okstate.edu but host still exits as if successful
in finding it.
There is a www.physicscourses.okstate.edu CNAME record
and this maybe has something to do with the unusual reply.
I had a script that was using the return status of host
and it works great guns unless you run in to this situation in
which it thinks the alias still exists. This causes an infinite
loop because it is waiting for the lookup to fail which it
normally does as soon as the nsupdate command's results
propagate out in a very short time.
I did check our zone for any other records for
physicscourses.okstate.edu which, of course, would be an error
after having had a CNAME record of that name, but there wre
Thanks for any light you can shed on why host still thinks there
is something there.
More information about the bind-users