Ansible launcher: Fix afs publisher root detection

The find command that collected the marker files is expected
to print paths with a leading '/' (see later commands which
grep for '^/') but this was omitted.  This would cause all jobs
which published to the root (whether they had any content in
the root directory or were simply only intended to publish to a
subdir of the root) to conflict with each other.

Also, correct a missing fully-qualified path.

Change-Id: I6030c2b101026ff8e72cf4043e1d1b4fbffc5dcb
This commit is contained in:
James E. Blair 2016-10-03 10:50:31 -07:00
parent b877c5488b
commit 226cdd4706
1 changed files with 2 additions and 2 deletions

View File

@ -1145,7 +1145,7 @@ class NodeWorker(object):
filter_file = os.path.join(afsroot, 'filter')
find_pipe = [
"/usr/bin/find {path} -name .root-marker -printf '%P\n'",
"/usr/bin/find {path} -name .root-marker -printf '/%P\n'",
"/usr/bin/xargs -I{{}} dirname {{}}",
"/usr/bin/sort > {file}"]
find_pipe = ' | '.join(find_pipe)
@ -1229,7 +1229,7 @@ class NodeWorker(object):
# then we should omit the '/*' exclusion so that it is
# implicitly included.
command = ("grep '^/$' {exclude} && "
command = ("/bin/grep '^/$' {exclude} && "
"echo '- /*' >> {filter} || "
"/bin/true".format(
exclude=exclude_file,