[OpenAFS-devel] Testing (and a call for volunteers)

Simon Wilkinson sxw@your-file-system.com
Thu, 20 Sep 2012 12:03:33 +0100


On 20 Sep 2012, at 01:46, Jeffrey Altman wrote:
> In other words, 'yes'.   The machine is misconfigured for running=20
> OpenAFS servers.
> OpenAFS does not support local hostname resolution to loopback=20
> addresses.

More specifically, this is a ubik problem. When a ubik server starts up, =
it picks one or more addresses to listen on. These addresses are also =
compared against the configuration in the server CellServDB to make sure =
that we are actually configured as a ubik server for the current cell. =
The test suite uses the same logic as ubik to work out the addresses to =
put in the test CellServDB.

That logic is:

    gethostname(hostname, sizeof(hostname));
    host =3D gethostbyname(hostname);
    memcpy(&ipaddr, host->h_addr, 4);

If ipaddr is a loopback address, then the ubik server will not start =
properly. In order for the tests to actually run, the machine itself =
must be listening on ipaddr

So, for the test suite to work, the machine's hostname must resolve to a =
non-loopback IP address, which the machine is actually listening on. On  =
my (Mac) laptop, I achieve this by adding a private network address to =
/etc/hosts, and adding an alias for eth0 that is configured with that =
address.

Cheers,

Simon.