-
Couldn't load subscription status.
- Fork 51
Closed
Labels
bugPOINT - Bugfix entry in the CHANGELOGPOINT - Bugfix entry in the CHANGELOG
Milestone
Description
File cloudera.cluster/roles/operations/refresh_ranger_kms_repo/tasks/cluster_find_ranger.yml contained a less than ideal check for determining Ranger interface of https/http.
Original Code block lines 70 - 95 :
- name: Check if HTTPS is used
uri:
url: "https://{{ _ranger_host }}:{{ _ranger_https_port }}"
status_code:
- 401
- -1
register: _ranger_https_resp
changed_when: false
- set_fact:
_ranger_https_used: "{{ _ranger_https_resp.status == 401 }}"
- name: Check if HTTP is used
uri:
url: "http://{{ _ranger_host }}:{{ _ranger_http_port }}"
status_code:
- 401
- -1
register: _ranger_http_resp
changed_when: false
when: not _ranger_https_used
- set_fact:
_ranger_http_used: "{{ not _ranger_https_used and _ranger_http_used.status | default(omit) == 401 }}"Changed to New code block with Client:
- name: Check if HTTPS is used
uri:
url: "https://{{ _ranger_host }}:{{ _ranger_https_port }}"
status_code:
- 401
- -1
register: _ranger_https_resp
changed_when: false
- name: Check if HTTP is used
uri:
url: "http://{{ _ranger_host }}:{{ _ranger_http_port }}"
status_code:
- 401
- -1
register: _ranger_http_resp
changed_when: false
- set_fact:
_ranger_https_used: "{{ ( _ranger_https_resp.status == 401 ) | bool }}"
_ranger_http_used: "{{ ( _ranger_http_resp.status == 401 ) | bool }}"Also attaching full file we patched to make work. File may need to be rewritten, but this was the on the fly patch.
cluster_find_ranger.yml.zip
Metadata
Metadata
Assignees
Labels
bugPOINT - Bugfix entry in the CHANGELOGPOINT - Bugfix entry in the CHANGELOG