ansible 2.3.2.0 => 2.4.0.0 connection problems?

Hi everyone,

Today I made a new ansible virtualenv with 2.4.0.0 and dependencies.
A task that worked before on 2.3.2.0 is stopping with a new error.

After the task completes ok, the run stops with error:
“”"
sending stop: [‘ssh’, ‘-vvv’, ‘-C’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=60’, ‘-o’, ‘ControlPath=/Users/LOCALUSER/.ansible/cp/276d6f8b70’, ‘-O’, ‘stop’, ‘None’]
ERROR! Cannot reset connection:
OpenSSH_7.3p1, OpenSSL 1.0.2k 26 Jan 2017
debug1: Reading configuration data /Users/LOCALUSER/.ssh/config
debug1: /Users/LOCALUSER/.ssh/config line 68: Applying options for *
debug1: Reading configuration data /opt/local/etc/ssh/ssh_config
debug1: auto-mux: Trying existing master
Control socket connect(/Users/LOCALUSER/.ansible/cp/276d6f8b70): No such file or directory
“”"

I verified the file doesn’t exist, and the ControlPath parameter for all the tasks that did run previously are using a totally different ControlPath that exists.

Going back to virtualenv with ansible 2.3.2.0 and dependencies works ok.

Is this something others have seen before?

What’s a good way to start debugging / troubleshooting?

-e

It looks like there may be a bug in the reset_connection meta task for the ssh connection plugin.

By the time reset is called, it looks like self.host is None, and as such, ssh is building an incorrect ControlPath.

Please open an issue for this.

Ok Matt,
Thanks for your advice. I’ll get something posted shortly.
-e

Tracking bug here https://github.com/ansible/ansible/issues/27520