Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ssh_connection] section in ansible.cfg stopped working after 2.9, but isn't reflected in (at least) the ansible.cfg file of the repo #75982

Closed
1 task done
Porkepix opened this issue Oct 8, 2021 · 10 comments
Assignees
Labels
affects_2.11 bug This issue/PR relates to a bug. needs_info This issue requires further information. Please answer any outstanding questions. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@Porkepix
Copy link

Porkepix commented Oct 8, 2021

Summary

It seems the whole [ssh_connection] section in the ansible.cfg file stopped working after 2.9, #73688 might be part of where it happened (thanks @sivel for the link)

Problem is that the ansible.cfg file isn't up to date, at least regarding that: the whole section here https://github.com/ansible/ansible/blob/stable-2.11/examples/ansible.cfg#L376 seems deprecated. This is particularly impacting for options such as pipeliningwhich resulted, in our case in brutal performances regressions, with CI times multiplied by 2 to 3.

Places such as https://github.com/ansible/ansible/pull/73688/files#diff-38cec806ea1a1ee7c3a286c7865334ecfba7ccc49e21d4e8fb8ec1b17938fda6R201 might also need an update.

cc @bcoca as we talked about this on IRC.

Should all of this be fixed for the source of information in past stable branches (2.10, 2.11) and doc regenerated? I also can't seem to find the move of those configurations to different sections in https://docs.ansible.com/ansible/devel/porting_guides/porting_guides.html so, should those be updated aswell?

@bcoca talked on irc about bringing back the [ssh_connection], but I'm not sure if he was talking about 2.12 only or 2.10 and 2.11 as well, nor if it's a good idea to have options available to three different places/sections of the file. I do think, though, that improvements doc/porting guides on that regard is important for people stumbling on such issue, especially if most of the migrating people are yet to come.

Issue Type

Bug Report

Component Name

ansible.cfg

Ansible Version

$ ansible --version
ansible [core 2.11.5]

Configuration

$ ansible-config dump --only-changed

OS / Environment

Linux/Mac

Steps to Reproduce

Expected Results

The documentation files should be representative of the real existing options. Same goes for the migration paths.

Actual Results

There are currently issues, especially in the `ansible.cfg` file.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibot
Copy link
Contributor

ansibot commented Oct 8, 2021

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.11 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 8, 2021
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Oct 12, 2021
@giner
Copy link
Contributor

giner commented Oct 19, 2021

[ssh_connection] is still mentioned in the following place as well https://docs.ansible.com/ansible/latest/collections/ansible/builtin/ssh_connection.html#parameter-pipelining

@pgrenaud
Copy link
Contributor

I'm quite frustrated to have found out about this the hard way. Something wrong was going on with one of our playbook and it turns out it was because the pipelining was no longer enabled, because it was located in the [ssh_connection] section.

While I understand that these type of refactoring must happen, I'm baffled that this change was not documented in any of the porting guide. I don't think that it is expected that every Ansible user must read all the changelogs to catch this type of changes, and that is why the porting guides exist.

Please, can this information be added to the relevant porting guide? Thank you.

@bcoca
Copy link
Member

bcoca commented Apr 11, 2022

First, the 'invalidation' of this method was an accident, we did not mean to remove it. As a policy we have strict deprecation periods for these things, so there should be plenty of notice ahead of time.

This was mostly due to an incorrect assumption of what other parts of the code were doing and the lack of specific tests for every possible configuration option, while most of this was fixed we could not easily backport all of it as it was a change in behavior of the code (which ignored some settings and hardcoded others), but that mostly affects 2.9.

To avoid further confusion we have also removed the 'example' ansible.cfg and given instructions for it to be generated directly from the 'working options' (via ansible-config init) instead of having it constantly out of date as new configuration chronically did not include this file.

As for the 'current' state of the ssh/pipelining configuration, the latest versions of 2.10/2.11 and above should all handle the new AND the old configuration settings, why there should be no issues with 'porting' across versions at this point. If you still find one, please let me know the exact version you are using so we can verify and correct this.

needs_info

@ansibot ansibot added the needs_info This issue requires further information. Please answer any outstanding questions. label Apr 11, 2022
@ansibot
Copy link
Contributor

ansibot commented Apr 27, 2022

@Porkepix This issue is waiting for your response. Please respond or the issue will be closed.

click here for bot help

@Porkepix
Copy link
Author

Dunno what should I add here, I think I provided everything that was needed?

@ansibot ansibot removed the needs_info This issue requires further information. Please answer any outstanding questions. label Apr 27, 2022
@diego-treitos
Copy link

diego-treitos commented Oct 24, 2022

I am sorry if I am necrobumping this but I've just found this the hard way too.

As for the 'current' state of the ssh/pipelining configuration, the latest versions of 2.10/2.11 and above should all handle the new AND the old configuration settings, why there should be no issues with 'porting' across versions at this point. If you still find one, please let me know the exact version you are using so we can verify and correct this.

I was running Ansible 2.12.5 and the options inside [ssh_connection] were not working for me. After adding the pipelining option to the [connection] section, my playbook took half of the time and also ansible-config dump showed the pipelining enabled.

I am trying to migrate the options to the new configuration format but I am missing several options that appear to be gone now. Inside the [ssh_connection] we also had options like ssh_args and retries, the new documentation doesn't show these options or how/if they were replaced. There are also other options like transfer_method, sftp_batch_mode... They are all gone and no documentation or deprecation warning about it.

Where are these options? Are they just gone?

@jborean93
Copy link
Contributor

Is this still a problem, if so what options are broken and what Ansible versions are affected. If there is still anything outstanding that doesn't work we need to look further into this but from what I can see our ssh connection plugin documents the required ansible config ini options so things should be working.

Where are these options? Are they just gone?

The options are defined on the SSH connection plugin itself under the DOCUMENTATION. For example ssh_args defines the ini entries ssh_args under [ssh_connection] here

- section: 'ssh_connection'
key: 'ssh_args'
. All the others you've mentioned are in there so should work.

needs_info

@jborean93 jborean93 added the needs_info This issue requires further information. Please answer any outstanding questions. label Apr 26, 2023
@ansibot
Copy link
Contributor

ansibot commented May 12, 2023

@Porkepix This issue is waiting for your response. Please respond or the issue will be closed.

click here for bot help

@diego-treitos
Copy link

I believe this issue can be closed now. Now the changes are in the documentation: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/ssh_connection.html

@bcoca bcoca closed this as completed May 22, 2023
@ansible ansible locked and limited conversation to collaborators May 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.11 bug This issue/PR relates to a bug. needs_info This issue requires further information. Please answer any outstanding questions. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

7 participants