OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_1pre2-24-gf44fb4f

Gerrit Code Review
Thu, 23 Feb 2012 09:35:14 -0800 (PST)

The following commit has been merged in the openafs-stable-1_6_x branch:
commit b6ec630bdab17f5505288565c52d07bdbe2e91e9
Author: Andrew Deason <>
Date:   Thu Feb 16 16:20:16 2012 -0600

    viced: Delete dup host before probing old host
    Currently, when the fileserver gets a new connection from an address
    not on the addr hash table, we allocate a new host structure and add
    that host to the addr hash table. If we then find that that host's
    uuid matches the uuid of an extant host, we do the following:
     - probe the old host with the uuid, and MultiProbeAlternateAddress_r
       if the probe fails
     - mark the duplicate host as HOSTDELETED
     - manipulate the interface lists
    Consider, for example, that we have an extant host ('oldHost') with
    address, but with on its alternate interface
    list. At some point, the interface goes away or becomes
    unreachable. A new connection comes in from that same host on
    What will happen is we create a new host for address, and
    then detect the uuid collision. When we try to probe the old address
    of, it will fail, and we will try to
    MultiProbeAlternateAddress_r. MultiProbeAlternateAddress_r will
    determine that the alternate address responds
    successfully to the probe, and it tries to set to be the
    primary address of 'oldHost', and add 'oldHost' to the addr hash table
    But the "new" host from the incoming connection is already hashed on
    the address hash table under, so the
    h_AddHostToAddrHashTable_r call in MultiProbeAlternateAddress_r fails.
    Since we later delete the new duplicate host, this results in being the primary address for the host, but that address
    is not anywhere in the address hash table.
    This behavior can be seen by the following pair of FileLog messages:
    Wed Feb  1 11:02:38 2012 CB: ProbeUuid for 0xdeadbeefdead ( failed -01
    Wed Feb  1 11:02:38 2012 h_AddHostToAddrHashTable_r: refusing to hash host beefdead, baadcafe ( already hashed
    While those message do not necessarily indicate this problem, this
    problem will result in those messages.
    To fix this, mark the duplicate host as HOSTDELETED before we do any
    probing on 'oldHost'. This way, if MultiProbeAlternateAddress_r tries
    to add 'oldHost' to the addr hash table under, it will be
    able to do so successfully, since the old duplicate host is deleted.
    Reviewed-by: Jeffrey Altman <>
    Reviewed-by: Derrick Brashear <>
    Reviewed-by: Alistair Ferguson <>
    Tested-by: BuildBot <>
    (cherry picked from commit 9754c4e15fb9073ed9f95d5d4242d311eb65d717)
    Change-Id: I35d41c91e496086377065f862021a5bb3fd221ef
    Tested-by: BuildBot <>
    Reviewed-by: Alistair Ferguson <>
    Reviewed-by: Derrick Brashear <>

 src/viced/host.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

OpenAFS Master Repository