Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Influxdb_user yields an unhandled exception when presented with invalid login credentials #50131

Closed
mdrose opened this issue Dec 19, 2018 · 2 comments · Fixed by #50134
Closed
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback.

Comments

@mdrose
Copy link
Contributor

mdrose commented Dec 19, 2018

SUMMARY

Influxdb_user yields an unhandled exception when presented with invalid login credentials

ISSUE TYPE
  • Bug Report
COMPONENT NAME

Influxdb_user

ANSIBLE VERSION

devel branch

STEPS TO REPRODUCE
---
- hosts: local
  connection: local
  tasks:
    - name: Add test user
      influxdb_user:
        username: admin
        password: invalid_admin_pw
        user_name: test
        state: present
EXPECTED RESULTS

Graceful failure

ACTUAL RESULTS
The full traceback is:
Traceback (most recent call last):
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1545206143.83-41094482064230/AnsiballZ_influxdb_user.py", line 113, in <module>
    _ansiballz_main()
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1545206143.83-41094482064230/AnsiballZ_influxdb_user.py", line 105, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1545206143.83-41094482064230/AnsiballZ_influxdb_user.py", line 48, in invoke_module
    imp.load_module('__main__', mod, module, MOD_DESC)
  File "/tmp/ansible_influxdb_user_payload_veBDH1/__main__.py", line 197, in <module>
  File "/tmp/ansible_influxdb_user_payload_veBDH1/__main__.py", line 164, in main
  File "/tmp/ansible_influxdb_user_payload_veBDH1/__main__.py", line 92, in find_user
  File "/home/vagrant/.local/lib/python2.7/site-packages/influxdb/client.py", line 769, in get_list_users
    return list(self.query("SHOW USERS").get_points())
  File "/home/vagrant/.local/lib/python2.7/site-packages/influxdb/client.py", line 416, in query
    expected_response_code=expected_response_code
  File "/home/vagrant/.local/lib/python2.7/site-packages/influxdb/client.py", line 286, in request
    raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 401: {"error":"authorization failed"}
@ansibot
Copy link
Contributor

ansibot commented Dec 19, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Dec 19, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. labels Dec 19, 2018
@sivel sivel removed needs_triage Needs a first human triage before being processed. labels Jan 2, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants