if not real.startswith(pwd.getpwuid(uid).pw_dir + "/"):
logging.error("Security check failed, owner of deployment and owner of home directory mismatch for %s" % d.location)
continue
- # calculate the log file, if a log dir was specified
- if options.log_dir:
- log_file = os.path.join(options.log_dir, shorten(d.location))
- child_args.append("--log-file=" + log_file)
# check if we want to punt due to --limit
i += 1
- if i > options.limit:
+ if options.limit and i > options.limit:
break
+ # calculate the log file, if a log dir was specified
+ if options.log_dir:
+ log_file = os.path.join(options.log_dir, shorten(i, d.location))
+ child_args.append("--log-file=" + log_file)
# actual meat
def make_on_pair(d):
def on_success(stdout, stderr):
def calculate_base_args(options):
base_args = command.makeBaseArgs(options, dry_run="--dry-run", srv_path="--srv-path", force="--force")
+ base_args += '--quiet'
return base_args
-def shorten(dir):
- hash = hashlib.sha1(dir).hexdigest()[0:7]
- return hash + dir.replace('/', '~')
+def shorten(i, dir):
+ return "%04d" % i + dir.replace('/', '-') + ".log"
def make_shell(options):
if options.no_parallelize: