I'm getting this error when running a Fabric task in parallel mode:
No handlers could be found for logger "paramiko.transport"
Fatal error: Needed to prompt for a connection or sudo password (host: node01 node02),
but input would be ambiguous in parallel mode
Aborting.
[node01 node02] run: sudo supervisorctl stop whatever
This is with the following code:
from fabric.api import execute, parallel, run, task
env.use_ssh_config = True
env.use_shell = False
@task
@parallel(pool_size=2)
def deploy():
run('sudo supervisorctl stop %s' % supervisor_job)
deploy.hosts = ['node01', 'node02']
execute(deploy)
However, if I turn off parallel, I don't see any SSH password or sudo prompts, or any errors about them:
I can also confirm that there are no prompts when SSHing to the node01 and node02 boxes manually, nor are there any sudo prompts when running the exact commands on the boxes.
This seems to only be an issue with parallel mode.
I've had so many issues with password prompts that I think it would be a good idea to have global settings for disabling both SSH password and sudo prompts. Fabric seems to guess that the prompts are necessary, and breaks when there is no standard input (when using Atlassian Bamboo, Jenkins, or some other build system).
I'd prefer to just manually tell Fabric never to prompt for anything, and fail if the operating system actually prompts.
I'm getting this error when running a Fabric task in parallel mode:
This is with the following code:
However, if I turn off parallel, I don't see any SSH password or sudo prompts, or any errors about them:
@parallel(pool_size=1)I can also confirm that there are no prompts when SSHing to the
node01andnode02boxes manually, nor are there any sudo prompts when running the exact commands on the boxes.This seems to only be an issue with parallel mode.
I've had so many issues with password prompts that I think it would be a good idea to have global settings for disabling both SSH password and sudo prompts. Fabric seems to guess that the prompts are necessary, and breaks when there is no standard input (when using Atlassian Bamboo, Jenkins, or some other build system).
I'd prefer to just manually tell Fabric never to prompt for anything, and fail if the operating system actually prompts.