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

Notifying Handlers in Autotls Role is not working correctly #215

Open
hadoopch opened this issue Mar 19, 2024 · 0 comments
Open

Notifying Handlers in Autotls Role is not working correctly #215

hadoopch opened this issue Mar 19, 2024 · 0 comments

Comments

@hadoopch
Copy link

Hi,

in roles/cloudera_manager/autotls/tasks/main.yml of the autotls role the fiollowing code is used if we have configured key authentication in autotls.

- name: Enable Auto-TLS
  cm_api:
    endpoint: "/cm/commands/generateCmca"
    method: POST
    body: "{{ lookup('template', 'auto-tls-key.json') }}"
  ignore_errors: true
  when: not use_password
  notify:
    - restart cloudera-scm-server
    - restart cloudera management service
    - restart cloudera-scm-agent

3 Handlers should be notified if something changed.

I debugged the role and saw that there is no status change (changed: false) even if TLS settings were changed.

So the 3 handlers are not notified.

ok: [cm001.cdp.lan] => {
    "cache_control": "no-cache, no-store, max-age=0, must-revalidate",
    "changed": false,
    "connection": "close",
    "content": "{\n  \"id\" : 1546344839,\n  \"name\" : \"GenerateCMCACommand\",\n  \"startTime\" : \"2024-03-19T09:02:10.735Z\",\n  \"endTime\" : \"2024-03-19T09:02:28.496Z\",\n  \"active\" : false,\n  \"success\" : true,\n  \"resultMessage\" : \"Successfully generated CMCA and enabled Auto-TLS\",\n  \"children\" : {\n    \"items\" : [ ]\n  }\n}",
  

Furthermore there is no notification at all in the code if autotls is configured by user and password

- name: Enable Auto-TLS
  cm_api:
    endpoint: "/cm/commands/generateCmca"
    method: POST
    body: "{{ lookup('template', 'auto-tls.json') }}"
    timeout: 360
  ignore_errors: true
  when: use_password

Regards

Uli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant