def redeploy_sparrow(machines, frontends, backends, opts, warmup_job_arrival_s=0, warmup_s=0,
                     post_warmup_s=0, nm_task_scheduler="fifo",
                     users="user0:1:0"):
  # Replace template vars
  tmp_dir = generate_deploy_files(frontends, backends, opts, warmup_job_arrival_s, warmup_s,
                                  post_warmup_s, nm_task_scheduler, users)

  for machine in machines:
    print machine.public_dns_name % "Copying files to: %s ..."

    # Rsync this to one machine
    command = (("rsync -rv -e 'ssh -o StrictHostKeyChecking=no -i %s' " +
        "'%s/' 'root@%s:~/'") % (opts.identity_file, tmp_dir, machine.public_dns_name))
    subprocess.check_call(command, shell=True)

# Deploy Sparrow binaries and configuration on a launched cluster
dataset/ETHPy150Open radlab/sparrow/deploy/ec2/ec2_exp.py/redeploy_sparrow/swapped operands of `%`