Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1010345: ansible: python3-resolvelib >= 0.6.0 breaks Ansible

626 views
Skip to first unread message

Gregor Riepl

unread,
Apr 29, 2022, 6:10:04 AM4/29/22
to
Package: ansible
Version: 5.5.0-1
Severity: important
X-Debbugs-Cc: oni...@gmail.com

Dear Maintainer,

Ansible has a strict dependency on resolvelib >=0.5.3 && <0.6.0, which is
documented in the upstream requirements.txt:
https://github.com/ansible/ansible/blob/devel/requirements.txt

Debian bullseye/sid installs 0.8.1, which breaks some functionality in Ansible.

In particular, downloading collections with ansible-galaxy is no longer
possible:

$ ansible-galaxy install -r requirements.yml -vvv
...
Process install dependency map
ERROR! Unexpected Exception, this is probably a bug:
CollectionDependencyProvider.find_matches() got an unexpected keyword argument
'identifier'
the full traceback was:

Traceback (most recent call last):
File "/usr/bin/ansible-galaxy", line 128, in <module>
exit_code = cli.run()
File "/usr/lib/python3/dist-packages/ansible/cli/galaxy.py", line 569, in run
return context.CLIARGS['func']()
File "/usr/lib/python3/dist-packages/ansible/cli/galaxy.py", line 86, in
method_wrapper
return wrapped_method(*args, **kwargs)
File "/usr/lib/python3/dist-packages/ansible/cli/galaxy.py", line 1203, in
execute_install
self._execute_install_collection(
File "/usr/lib/python3/dist-packages/ansible/cli/galaxy.py", line 1230, in
_execute_install_collection
install_collections(
File "/usr/lib/python3/dist-packages/ansible/galaxy/collection/__init__.py",
line 548, in install_collections
dependency_map = _resolve_depenency_map(
File "/usr/lib/python3/dist-packages/ansible/galaxy/collection/__init__.py",
line 1364, in _resolve_depenency_map
return collection_dep_resolver.resolve(
File "/usr/lib/python3/dist-packages/resolvelib/resolvers.py", line 481, in
resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/usr/lib/python3/dist-packages/resolvelib/resolvers.py", line 348, in
resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/usr/lib/python3/dist-packages/resolvelib/resolvers.py", line 147, in
_add_to_criteria
matches = self._p.find_matches(
TypeError: CollectionDependencyProvider.find_matches() got an unexpected
keyword argument 'identifier'


Related issue: https://bugs.gentoo.org/795933

I'm not aware of a proper patch for this issue.
Gentoo has fixed it by pinning the resolvelib dependency to the requested
version range.


-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.16.0-6-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ansible depends on:
ii ansible-core 2.12.4-1
ii openssh-client 1:9.0p1-1
ii python3 3.10.4-1
ii python3-distutils 3.9.12-1
ii python3-dnspython 2.2.0-2
ii python3-httplib2 0.20.2-2
ii python3-jinja2 3.0.3-1
ii python3-netaddr 0.8.0-2
ii python3-yaml 5.4.1-1+b1

Versions of packages ansible recommends:
ii python3-argcomplete 1.12.3-0.1
ii python3-cryptography 3.4.8-1
ii python3-jmespath 1.0.0-1
ii python3-kerberos 1.1.14-3.1+b4
ii python3-libcloud 3.4.1-2
ii python3-selinux 3.3-1+b2
ii python3-winrm 0.3.0-2
ii python3-xmltodict 0.12.0-2

Versions of packages ansible suggests:
pn cowsay <none>
ii sshpass 1.09-1+b1

-- no debconf information

Matthias Weiss

unread,
May 9, 2022, 10:50:03 AM5/9/22
to
I can confirm this bug on an up to date Debian "bookworm" installation:

ansible-galaxy-vvvcollectioninstallcommunity.general
[DEPRECATION WARNING]: Setting verbosity before the arg sub command is
deprecated, set the verbosity after the sub command. This feature will
be removed from ansible-core in version 2.13.
Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
ansible-galaxy [core 2.12.4]
 config file = /home/matthias/.ansible.cfg
 configured module search path =
['/home/matthias/.ansible/plugins/modules',
'/usr/share/ansible/plugins/modules']
 ansible python module location = /usr/lib/python3/dist-packages/ansible
 ansible collection location =
/home/matthias/.ansible/collections:/usr/share/ansible/collections
 executable location = /usr/bin/ansible-galaxy
 python version = 3.10.4 (main, Mar 24 2022, 13:07:27) [GCC 11.2.0]
 jinja version = 3.0.3
 libyaml = True
Using /home/matthias/.ansible.cfg as config file
Starting galaxy collection install process

Lee Garrett

unread,
Nov 28, 2022, 2:40:03 PM11/28/22
to
Hi Gregor,

can you still reproduce this bug? AFAICS this was fixed in the 2.13.3
upload.

Additionally, I'll tighten the package dependencies so this issue will
be more apparent in the future.

Greetings,
Lee

Gregor Riepl

unread,
Nov 29, 2022, 4:30:04 PM11/29/22
to
Hi Lee,

> can you still reproduce this bug? AFAICS this was fixed in the 2.13.3
> upload.

I couldn't find the original requirements.yml that produced the error,
but I tested a similar file with Ansible 2.13.4, and it worked fine.

> Additionally, I'll tighten the package dependencies so this issue will
> be more apparent in the future.

Thanks, I appreciate it! Hopefully there will be a more stable
resolvelib soon that doesn't cause these problems any more.

By the way, what's the reason for the disparate versioning in Ansible
and the ansible package? Why is Ansible 2.13.4 packaged as 6.4.0+dfsg-1?

Regards,
Gregor

Lee Garrett

unread,
Nov 30, 2022, 2:20:04 PM11/30/22
to
Hi Gregor,

On 29/11/2022 22:19, Gregor Riepl wrote:
> Hi Lee,
>
>> can you still reproduce this bug? AFAICS this was fixed in the 2.13.3
>> upload.
>
> I couldn't find the original requirements.yml that produced the error,
> but I tested a similar file with Ansible 2.13.4, and it worked fine.

That's great news!

>
>> Additionally, I'll tighten the package dependencies so this issue will
>> be more apparent in the future.
>
> Thanks, I appreciate it! Hopefully there will be a more stable
> resolvelib soon that doesn't cause these problems any more.
>
> By the way, what's the reason for the disparate versioning in Ansible
> and the ansible package? Why is Ansible 2.13.4 packaged as 6.4.0+dfsg-1?

The upstream project has split into the "core" (the binaries basically,
which was called "base" for one release cycle), and the community
modules (now just called "ansible").

Also check /usr/share/doc/ansible/NEWS.Debian.gz for details. :)
>
> Regards,
> Gregor

Regards,
Lee
0 new messages