Closed adriansev closed 9 months ago
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.
cc @slok click here for bot help
!component =plugins/cache/redis.py
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.
My guess is that this is related to the redis Python library. Which version did you use before (when it worked), and which version do you use now?
Well, i have no idea but i just tried many redis versions (down to 4.3.0 from 8 may 2022) and i get the same error .. I think is something really weird with the message:
ERROR! Unexpected Exception, this is probably a bug: Error -2 connecting to "localhost:6379. Name or service not known.
notice the unpaired quotes so i removed the quotes from my connection setting:
fact_caching = community.general.redis
-fact_caching_connection = "localhost:6379:0:"
+fact_caching_connection = localhost:6379:0:
and the problem is solved .. so, at this moment i'm inclined to think that there is a problem
with the community.general.redis
parsing of fact_caching_connection
value ..
OTOH looking in
https://github.com/ansible-collections/community.general/blame/main/plugins/cache/redis.py
in the blame list i see no relevant recent modification ..
i only noted this line: https://github.com/ansible-collections/community.general/blob/main/plugins/cache/redis.py#L150
where it is noted the format for _uri
that is quoted ..
So, i have no idea about the actual bug ...
Now the question is: the fact the the connection declaration don't like anymore the quotes is a bug?
Thanks a lot!
Good spot with the unpaired quote! The parsing of ansible.cfg is done by ansible-core, so maybe you changed the version of that one, and parsing behavior of that one changed? (Because as you noticed, the plugin didn't changed.)
one more thing about parsing: i had fact_caching_prefix = ""
and after the above solution
i just found out that i have the host keys in redis with the form:
""issaf-0-4
""issaf-0-5
notice the ""
in front... so for certain the parsing and interpretation of value definitions in ansible.cfg was changed
Summary
After updating to:
the redis connection for fact caching is broken:
this is my simple declaration or redis connection that used to work https://github.com/adriansev/ansible_iss/blob/master/ansible.cfg#L49
Any idea about this? Thanks a lot!
Issue Type
Bug Report
Component Name
redis
Ansible Version
Community.general Version
Configuration
OS / Environment
Fedora 39
Steps to Reproduce
just the simplest of
ansible-inventory --list
see the complete post aboveExpected Results
I expected no errors (until yesterday everything worked then i updated all ansible related components)
Actual Results
Code of Conduct