ansible_modules icon indicating copy to clipboard operation
ansible_modules copied to clipboard

[Bug]: The netbox_interface routing is strange

Open tadeboro opened this issue 3 years ago • 11 comments

The runtime file has both redirect and tombstone in place for netbox.netbox.netbox_interface. One of those two options should be removed.

Which one gets removed depends on the compatibility between those two modules, which is why I di not prepare a PR - I do not know the codebase enough to make the right decision.

tadeboro avatar Jun 01 '21 09:06 tadeboro

0.1.0 was released Nov of 2019 so what about just removing both the tombstone and redirect? I think we've given people plenty of time to update.

sc68cal avatar Nov 02 '21 21:11 sc68cal

Ah this is because Ansible was distributing a module for netbox_interface in old versions of Ansible. OK, maybe I'll reach out to some of the Ansible maintainers and just check if we're clear of Ansible 2.9 and can remove this.

sc68cal avatar Nov 02 '21 21:11 sc68cal

Just removing that entry is probably not the best idea. Tho core engine still redirects to the netbox.netbox.netbox_interface. Without the corresponding entry in the netbox.netbox collection, users will get a "you have a typo in your module name" error when they should be either notified that the module is gone (if the old and replacement modules are too different) or they should be redirected to the replacement module (if the interfaces of the modules in question are similar enough).

So as I said in the original bug report, you should pick one option (tombstone or redirect) and then leave it in until the end of time (which is another name for "when ansible-core drops redirects from its runtime file ;)).

tadeboro avatar Nov 03 '21 06:11 tadeboro

Ah, thanks for the explanation, much appreciated. My vote would be for tombstone to remain and drop the redirect. Then see if we can get Ansible to rework their redirect to go from netbox_interface to netbox_device_interface

sc68cal avatar Nov 03 '21 16:11 sc68cal

I threw up a draft PR in Ansible core, see if we can generate some consensus on how to move forward

sc68cal avatar Nov 03 '21 16:11 sc68cal

The runtime file from ansible/ansible is more or less read-only now, and my guess is that your PR will be rejected. Also, it does not make sense to have a tombstone in the collection while at the same time having a redirect to the new module in the core.

Also, you still did not clarify how similar old and new modules are. And the similarity is probably the most important factor when deciding between the tombstone and redirect.

tadeboro avatar Nov 03 '21 17:11 tadeboro

I did a bit of comparison between netbox_interface and netbox_device_interface in https://github.com/ansible/ansible/pull/76211#issuecomment-963533547 - they are similar but not 100% compatible due to some type changes

sc68cal avatar Nov 08 '21 23:11 sc68cal

Not much we can do with the old release of ansible. The Ansible team decides what ansible collections (including version) with a release of ansible.

Generally if you want more control of this, the ansible team recommends you leverage either ansible-base or ansible-core (depending on the ansible version), and installing your own desired ansible collections & versions. The fuller/fatter ansible package with popular collections included is more for your convivence.

The reason they split the packaging up into ansible-base and later renamed to ansible-core is preciously because of this issue. People were raising issues against ansible core for bugs in included collections or to bump included collection versions to take care of some downstream bug.

ryanmerolle avatar Jan 25 '22 19:01 ryanmerolle

@ryanmerolle I am not sure why this issue was closed since the problem is still not solved. And this issue has nothing to do with either ansible-core or community ansible package. The metadata in this collection is bad and should be fixed in one of two ways that I outlined previously.

tadeboro avatar Jan 25 '22 20:01 tadeboro

@tadeboro apologies for the mistake. I was overzealous in the cleanup and reorg of issues. I also apparently overly focused on the mention of ansible and the raised issue.

ryanmerolle avatar Jan 25 '22 21:01 ryanmerolle

I think we should remove the redirect and keep the tombstone. The modules will just diverge more as time goes by so the user should be told to use the new module.

rodvand avatar Nov 27 '22 18:11 rodvand