Future of the (deprecated) paramiko connection plugin

The paramiko connection plugin (which has been part of Ansible since version 0.1 apparently) has been deprecated in ansible-core 2.19, but apparently without any indication in the documentation and no runtime warning when someone uses the plugin, and also no mention in the porting guide. (So basically if you didn’t read about it in the changelog, you can’t know about it, even if you use it.) (If you’re interested in why it’s deprecated, see issue #83757 in ansible/ansible.)

(I think the lack of properly communicating the deprecation is a big problem and thus the deprecation should be moved to a later version, but that shouldn’t be the topic of this discussion.)

Recently @shertel created a PR in community.general to add the connection plugin there. After some time, there apparently was a discussion of the networking team taking over the plugin, and thus the PR was closed. But then it turned out that the networking team only wants to keep a subset of it for the network_cli connection plugin, so the future of the general paramiko_ssh plugin is open again. Right now it will be removed from ansible-core without any replacement.

So I guess the big question is: does anyone still use this plugin? I’m happy to get it included in community.general and trying to (help to) keep it alive, but I’m not sure whether it’s still needed. (And since its users might not have even noticed that it will be removed, it’s quite possible that there is a larger user-base who didn’t speak up so far because they simply don’t know that it will get removed.)

4 Likes

There’s also the ssh connection plugin. I don’t use or even know about both plugins. They look somewhat redundant to me. So it would be interesting to know what’s possible with the paramiko plugin that can’t be done with the ssh one.

Some history can be found here. I picked the Ansible 5 docs because the old texts were still there (they likely were already no longer accurate by then).

I don’t remember much about all these, but my guess is that once SSH with ControlPersist became pretty much standard everywhere there wasn’t that much use for the other SSH connection plugins than ssh anymore, except maybe for some special circumstances. I have no idea what these special circumstances can be, which is part of why I opened this thread :wink: If there are none, I guess there’s no need to keep the plugin alive.

2 Likes

The special circumstances were normally related to ssh daemons that were incompatible with OpenSSH, which was mostly old Solaris and old network appliances.

4 Likes

@mariolenz for network operations we need the capabilities to manage prompts, interaactive states of the network appliance and paging at times. A persistent session is needed to detect different applaince specific prompts and responses of sequential command execution for all these operations over a ptty paramiko or the ansible-pylibssh is needed.

And while we are pushing network automation users to migrate to libssh over paramiko, we still have folks who are working with legacy appliances that still support weaker algorithms. Keeping community interest in mind, we started working on keeping paramiko as a connection option via ansible_network_cli_ssh_type for 2 years in ansible.netcommon PR - paramiko implicit stay in netcommon, impacts ansible-core 2.21 by KB-perByte · Pull Request #752 · ansible-collections/ansible.netcommon · GitHub after core drops it after 2.21

5 Likes

If I am reading this correctly you are just adding the paramiko plugin as an internal class into network_cli, this would not allow it to be normally used for anything outside network_cli, would it make sense to just migrate the existing plugin to c.general for other uses?

2 Likes

@bcoca, that is correct, we are keeping it just to network_cli, and we don’t want to advertise it as an individual connection plugin, it stays as a ssh_type options without paramiko having a connection plugin significance. Everything is dealt within network_cli and from a user pov there is no change in usage.

If the existing plugin is moved to community.gen as of this https://github.com/ansible-collections/community.general/pull/11293 we can obviously do that if the larger community has it’s requrienment. But if we need to deal with paramiko just for covering network-specific users, I think it’s better off in netcommon. Which would stay with us for 2 years, and we are marking it deprecated / last resort option right when we are adding it.

I am happy to discuss more about the whereabouts of paramiko, to have a controlled impact on community.

From my perspective community.general shouldn’t bother maintaining a separate implementation for ancient networking devices. I was excited to hear the networking team planned to “take ownership” of the plugin before that turned out to not be the case, because it seemed like a much better fit than relying on community.general keeping a niche networking-related use case working. I’m sad for the users who will need to rewrite their content though - seems easily avoidable.

For the networking collection, the default ssh_type is already set to libssh, and it has been the recommended transport for some time. On the networking side, we don’t expect users to rewrite any of their content.

Our goal is to achieve feature parity between the libssh and paramiko transport types within the scope of ansible.netcommon.network_cli connection plugin. We’re actively working to fix the known community reported issues where scenarios work with ssh_type=paramiko but not with ssh_type=libssh, specifically in the context of the network_cli connection plugin.

The networking team has been planning to deprecate ssh_type=paramiko for a while, and that effort has been expedited now that the plugin will been moved out of ansible-core soon.