8000 influxdb_retention_policy module throws RequestsDependencyWarning error · Issue #3897 · ansible-collections/community.general · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
influxdb_retention_policy module throws RequestsDependencyWarning error #3897
Open
@stefanhorning

Description

@stefanhorning

Summary

When running a task using the influxdb_retention_policy module I got the following error:

"module_stdout": "/usr/lib/python3/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1639397386.5292273-886873-207932613843030/AnsiballZ_influxdb_retention_policy.py\", line 100, in <module>
    _ansiballz_main()
  File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1639397386.5292273-886873-207932613843030/AnsiballZ_influxdb_retention_policy.py\", line 92, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1639397386.5292273-886873-207932613843030/AnsiballZ_influxdb_retention_policy.py\", line 41, in invoke_module
    run_name='__main__', alter_sys=True)
  File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code
    exec(code, run_globals)
  File \"/tmp/ansible_community.general.influxdb_retention_policy_payload_1894r6s9/ansible_community.general.influxdb_retention_policy_payload.zip/ansible_collections/community/general/plugins/modules/influxdb_retention_policy.py\", line 343, in <module>
  File \"/tmp/ansible_community.general.influxdb_retention_policy_payload_1894r6s9/ansible_community.general.influxdb_retention_policy_payload.zip/ansible_collections/community/general/plugins/modules/influxdb_retention_policy.py\", line 331, in main
  File \"/tmp/ansible_community.general.influxdb_retention_policy_payload_1894r6s9/ansible_community.general.influxdb_retention_policy_payload.zip/ansible_collections/community/general/plugins/modules/influxdb_retention_policy.py\", line 284, in alter_retention_policy

TypeError: alter_retention_policy() takes from 2 to 6 positional arguments but 7 were given", 

Probably due to outdated version of urllib/python on the target machine, running Ubuntu 18.04. But since I don't get any other Ansible errors against this environment, I tihnk this still should be fixed.

Issue Type

Bug Report

Component Name

influxdb_retention_policy

Ansible Version

$ ansible --version
ansible [core 2.11.6] 
  config file = ./ansible.cfg
  configured module search path = ['./library', '/home/stefan-mf/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = ~/.local/lib/python3.9/site-packages/ansible
  ansible collection location = ~/.ansible/collections:/usr/share/ansible/collections
  executable location = ~/.local/bin/ansible
  python version = 3.9.5 (default, May 11 2021, 08:20:37) [GCC 10.3.0]
  jinja version = 3.0.1
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general
Collection        Version
----------------- -------
community.general 4.1.0  

Configuration

$ ansible-config dump --only-changed

OS / Environment

Ubuntu 21.04 on Ansible host, Ubuntu 18.04 on target host.

Python/urllib version on target host:

$ python3 --version
Python 3.6.9
$ pip3 list | grep urllib
urllib3 (1.26.7)

Steps to Reproduce

- name: Create retention policy for Influx DB
  community.general.influxdb_retention_policy:
    # Connection details:
    hostname:       "{{ influxdb_host }}"
    port:           "{{ influxdb_port }}"
    username:       "{{ influxdb_admin_user }}"
    password:       "{{ influxdb_admin_pw }}"
    database_name:  "{{ influxdb_telegraf_db }}"
    # policy setup:
    policy_name: "{{ telegraf_retention_policy_name }}"
    duration: "{{ telegraf_retention_time }}"
    replication: 1
    default: true

Expected Results

No module errors

Actual Results

RequestsDependencyWarning: urllib3 (1.26.7) or chardet (3.0.4) doesn't match a supported version!

Complete stacktrace see above.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0