[OpenAFS] backup - order of entries in volume set

Benjamin Kaduk kaduk@MIT.EDU
Thu, 27 Aug 2015 21:02:16 -0400 (EDT)

On Thu, 27 Aug 2015, Gunnar Krull wrote:

> Hi,
> when I have a backup Volume Set defined in this order, the volume
> "user.backup" is not included into the backup:
> Volume set userbackup:
>     Entry 1: server .*, partition .*, volumes: user\..*\.backup
>     Entry 2: server .*, partition .*, volumes: user\.backup
> But when I change the order of the two Volume Set entries, the volume
> "user.backup" is included:
> Volume set userbackup:
>     Entry   1: server .*, partition .*, volumes: user\.backup
>     Entry   2: server .*, partition .*, volumes: user\..*\.backup
> It's strange, but the order is irrelevant for another Volume Set. The
> difference to the example above is, that the resulting volume list to be
> backuped only consists of two volumes. Namely: "svn.backup" and
> "svn.test.backup".
> I couldn't find an explanation for this behavior.
> Is there something wrong in my understanding of the volume set definitions?

Most likely, there is a bug.

Unfortunately, the backup code is some of the least-maintained and worst
code in the tree that we still have some expectation of people actually
using (which excludes kauth, among other things), so the reason is
unlikely to be clear solely from code examination.  To make matters worse,
there are a few codepaths that could be taken; in what I think is the
common case, the regex is actually evaluated on the vlserver, not on the
machine running the backup utility.  (Note that this means that different
calls may get different results, if the vlservers are not homogeneous and
have different regex libraries on them!)

As a first debugging step, I would suggest using wireshark or similar to
capture traffic between the backup utility and the vlserver(s) to confirm
whether the problem exists in the vlserver code or on the client side.

-Ben Kaduk