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

Error creating servicegroups #13

Closed
FLiPp3r90 opened this issue Jun 8, 2020 · 6 comments · Fixed by #19
Closed

Error creating servicegroups #13

FLiPp3r90 opened this issue Jun 8, 2020 · 6 comments · Fixed by #19

Comments

@FLiPp3r90
Copy link

FLiPp3r90 commented Jun 8, 2020

While deploy servicegroups with icinga_servicegroup module, the first run of any servicegroup will finish with an error.

The example playbook:

- hosts: localhost
  collections:
    - t_systems_mms.icinga_director
  tasks:
    - name: create servicegroup
      icinga_servicegroup:
        state: present
        url: "{{ icinga_director_url }}"
        url_username: "{{ icinga_user }}"
        url_password: "{{ icinga_pass }}"
        object_name: foo-test-prx
        assign_filter: 'host.name="foo-test-prx*"'

Any play will abort with following error:

fatal: [localhost]: FAILED! => {
    "changed": false, 
    "invocation": {
        "module_args": {
            "assign_filter": "host.name=\"foo-test-prx*\"", 
            "client_cert": null, 
            "client_key": null, 
            "display_name": null, 
            "force_basic_auth": false, 
            "object_name": "foo-test-prx", 
            "state": "present", 
            "url": "https://7008.domon-web.internal.mms-support.de", 
            "url_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", 
            "url_username": "fnu-domon-7008", 
            "use_proxy": true, 
            "validate_certs": true
        }
    }, 
    "msg": "bad return code while creating: "

As a woraroud, you can set ignore_errors=true in any play, nevertheless the object was created successfully.

@schurzi
Copy link
Contributor

schurzi commented Jun 8, 2020

could you run this with an added -vvv so we can see the complete HTTP response?

@rndmh3ro
Copy link
Collaborator

rndmh3ro commented Jun 9, 2020

We need to fix the error logging here, aside from the actual error.

@FLiPp3r90
Copy link
Author

Hi @schurzi,

sorry but this is already the whole debug output with -vvv option set.

@rndmh3ro
Copy link
Collaborator

rndmh3ro commented Jun 9, 2020

Can you please try the following play:

- hosts: localhost
  collections:
    - t_systems_mms.icinga_director
  tasks:
    - name: create servicegroup
      icinga_servicegroup:
        state: present
        force_basic_auth: true                      # added
        url: "{{ icinga_director_url }}"
        url_username: "{{ icinga_user }}"
        url_password: "{{ icinga_pass }}"
        object_name: foo-test-prx
        assign_filter: 'host.name="foo-test-prx*"'

The problem seems to be the internal proxy. I just tried without proxy and without force_basic_auth and it worked. With proxy and without force_basic_auth I got the same error.

I'll try to fix the output here.

@rndmh3ro
Copy link
Collaborator

rndmh3ro commented Jun 9, 2020

The issue seems to be the same as here:
getsentry/raven-python#1285
pithos/pithos#617

Seems to be a problem with the urllib python module. No solution in sight.

@FLiPp3r90
Copy link
Author

FLiPp3r90 commented Jun 11, 2020

Hi @schurzi, @rndmh3ro,
seem to work with force_basic_auth behind the proxy.

rndmh3ro added a commit that referenced this issue Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants