[OpenAFS] vos tool ignoring loopback names with 1.8 can make local
Mon, 18 Jan 2021 13:59:20 +1100
In the process of updating from 1.6 -> 1.8 I noticed it became
impossible to query the server locally using the usual incarnations
you would think to try; e.g.
root@afs01:/afs/openstack.org# vos partinfo -localauth -server localhost
vos: server 'localhost' not found in host table
root@afs01:/afs/openstack.org# vos partinfo -localauth -server 127.0.0.1
vos: server '127.0.0.1' not found in host table
root@afs01:/afs/openstack.org# vos partinfo -localauth -server afs01.ord.openstack.org
vos: server 'afs01.ord.openstack.org' not found in host table
root@afs01:/afs/openstack.org# vos partinfo -localauth -server afs01
vos: server 'afs01' not found in host table
It seems this is definitely the intention of GetServer  to filter
local addresses; I do realise this is rather ridiculous ancient
history as it seemed to come in with , but that only seemed to come
in with 1.8.
In this case, the /etc/hosts is setup in the standard manner
root@afs01:/afs/openstack.org# cat /etc/hosts
127.0.1.1 afs01.ord.openstack.org afs01
So any incarnation of gethostbyname() is going to return the loopback
address and get filtered out, stopping the query.
I'm not always on a host with AFS tools setup so I'm fairly used to
jumping on the servers to query them as part of admin.
I see that this needs to be careful adding servers, etc. where we
don't want the volume db having entries for 127.*. But is this
filtering a little over-zealous for the query type commands (partinfo,
status, listvol, etc.)?
At a minimum I could look at making the error more specific when it
filters out the addresses if that seems valuable? Something like "no
non-loopback addresses found" would at least be much clearer.