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

Allow processing of a specific configuration file for libssh #498

Merged
merged 4 commits into from
Apr 3, 2023

Conversation

donnerhacke
Copy link
Contributor

SUMMARY

Depending on the destination, libssh might need to be configured in a way, that the algorithms and methods need to be adjusted. Instead of adding each possible configuration option into the wrapper, including a config file (as it exists for ordinary OpenSSH) is much easier. This allows ansible to connect to devices with less well supported algorithms.

This is a required step to fix connection issues with ansible.netcommon.libssh. The called ansible-pylibssh need to process the new optional argument config_file. But this is a separate patch, which needs to be applied there.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ansible.netcommon.libssh

ADDITIONAL INFORMATION

Solve open connections issues with older devices, i.e.: #430

@donnerhacke
Copy link
Contributor Author

Link to the patch on the other side: ansible/pylibssh#479

@donnerhacke donnerhacke changed the title Allow processing of a specific configuration file for the connection Allow processing of a specific configuration file for libssh Jan 4, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ ansible-changelog-fragment SUCCESS in 18s
ansible-test-network-integration-junos-vsrx-netconf-python36-stable29 FAILURE in 9m 21s (non-voting)
ansible-test-network-integration-junos-vsrx-netconf-python36-stable211 RETRY_LIMIT in 9m 25s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39-stable212 SUCCESS in 1h 00m 02s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39 SUCCESS in 1h 00m 31s
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable29 FAILURE in 9m 22s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python36-stable211 SUCCESS in 12m 45s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39-stable212 SUCCESS in 11m 38s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39 SUCCESS in 11m 56s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable29 FAILURE in 11m 58s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable211 SUCCESS in 12m 31s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39-stable212 FAILURE in 21m 04s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39 SUCCESS in 11m 59s
✔️ ansible-ee-integration-cisco-nxos-cli-python39-latest SUCCESS in 2h 16m 10s (non-voting)
✔️ ansible-ee-integration-arista-eos-latest SUCCESS in 1h 04m 55s
✔️ ansible-ee-integration-arista-eos-stable-2.9 SUCCESS in 58m 13s
✔️ ansible-ee-integration-arista-eos-stable-2.11 SUCCESS in 1h 04m 23s
✔️ ansible-ee-integration-arista-eos-stable-2.12 SUCCESS in 1h 04m 41s
✔️ ansible-ee-integration-arista-eos-httpapi-latest SUCCESS in 41m 59s
✔️ ansible-ee-integration-arista-eos-httpapi-stable-2.9 SUCCESS in 38m 08s (non-voting)
✔️ ansible-ee-integration-arista-eos-httpapi-stable-2.11 SUCCESS in 47m 28s
✔️ ansible-ee-integration-arista-eos-httpapi-stable-2.12 SUCCESS in 42m 33s
✔️ ansible-ee-integration-arista-eos-libssh-latest SUCCESS in 1h 08m 24s
✔️ ansible-ee-integration-arista-eos-libssh-stable-2.9 SUCCESS in 1h 00m 15s
✔️ ansible-ee-integration-arista-eos-libssh-stable-2.11 SUCCESS in 1h 09m 20s
✔️ ansible-ee-integration-arista-eos-libssh-stable-2.12 SUCCESS in 1h 08m 44s
ansible-ee-integration-ios-latest FAILURE in 14m 00s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 13m 48s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 14m 21s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 13m 49s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 41m 20s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 NODE_FAILURE in 0s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 NODE_FAILURE in 0s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 NODE_FAILURE in 0s (non-voting)
✔️ ansible-ee-integration-vyos-latest SUCCESS in 1h 06m 21s
✔️ ansible-ee-integration-vyos-libssh-latest SUCCESS in 1h 08m 55s
✔️ build-ansible-collection SUCCESS in 6m 34s
✔️ ansible-test-network-integration-ansible-netcommon-junos-vsrx-netconf-python39 SUCCESS in 9m 34s
✔️ ansible-tox-linters SUCCESS in 5m 08s
✔️ ansible-galaxy-importer SUCCESS in 4m 16s

@donnerhacke
Copy link
Contributor Author

Build failed.

Those failures seemed to be related to an unreachable test-system, not to the code.

@Qalthos Qalthos self-requested a review January 11, 2023 13:28
plugins/connection/libssh.py Outdated Show resolved Hide resolved
changelogs/fragments/libssh_config_file.yaml Outdated Show resolved Hide resolved
lutz and others added 3 commits April 3, 2023 11:54
Depending on the destination, libssh might need to be configured in a
way, that the algorithms and methods need to be adjusted. Instead of
adding each possible configuration option into the wrapper, including
a config file (as it exists for ordinary OpenSSH) is much easier. This
allows ansible to connect to devices with less well supported
algorithms.

This is a required step to fix connection issues with
ansible.netcommon.libssh. The called ansible-pylibssh need to
process the new optional argument config_file. But this is a separate
patch, which needs to be applied there.
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/71108c1e51b944b7988afca301ab2e2d

ansible-test-network-integration-junos-vsrx-netconf-python36-stable29 FAILURE in 12m 13s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-netconf-python36-stable211 SUCCESS in 1h 14m 30s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39-stable212 SUCCESS in 1h 01m 59s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39 SUCCESS in 1h 10m 50s
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable29 FAILURE in 9m 27s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python36-stable211 SUCCESS in 15m 25s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39-stable212 SUCCESS in 12m 49s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39 SUCCESS in 15m 21s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable29 FAILURE in 10m 36s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable211 SUCCESS in 15m 27s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39-stable212 NODE_FAILURE Node request 200-0005850467 failed in 0s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39 NODE_FAILURE Node request 200-0005850468 failed in 0s
✔️ ansible-test-network-integration-nxos-cli-python39-scenario01 SUCCESS in 38m 48s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario02 SUCCESS in 42m 52s (non-voting)
ansible-test-network-integration-nxos-cli-python39-scenario03 FAILURE in 39m 18s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario04 SUCCESS in 39m 15s (non-voting)
ansible-test-network-integration-eos-network_cli-python39 FAILURE in 1h 03m 46s (non-voting)
✔️ ansible-test-network-integration-eos-httpapi-python39 SUCCESS in 44m 22s (non-voting)
ansible-test-network-integration-eos-network_cli-libssh-python39 FAILURE in 57m 55s (non-voting)
ansible-ee-integration-ios-latest FAILURE in 19m 53s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 19m 52s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 19m 30s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 13m 08s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 13m 27s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 11m 56s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 18m 03s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 12m 59s (non-voting)
ansible-test-network-integration-vyos-paramiko-python39-devel NODE_FAILURE Node request 200-0005850484 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable214 NODE_FAILURE Node request 200-0005850485 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable213 NODE_FAILURE Node request 200-0005850486 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable212 NODE_FAILURE Node request 200-0005850487 failed in 0s
ansible-test-network-integration-vyos-paramiko-python36-stable29 NODE_FAILURE Node request 200-0005850488 failed in 0s (non-voting)
ansible-test-network-integration-vyos-libssh-python39-devel NODE_FAILURE Node request 200-0005850489 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable214 NODE_FAILURE Node request 200-0005850490 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable213 NODE_FAILURE Node request 200-0005850491 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable212 NODE_FAILURE Node request 200-0005850492 failed in 0s
ansible-test-network-integration-vyos-libssh-python36-stable29 NODE_FAILURE Node request 200-0005850493 failed in 0s
✔️ build-ansible-collection SUCCESS in 14m 42s
✔️ ansible-test-network-integration-ansible-netcommon-junos-vsrx-netconf-python39 SUCCESS in 12m 46s
✔️ ansible-tox-linters SUCCESS in 10m 58s
✔️ ansible-galaxy-importer SUCCESS in 4m 00s

@Qalthos Qalthos merged commit b96979a into ansible-collections:main Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants