Ranger's idempotency issue with "playbooks/ranger_usersync_config.yml"
Closed this issue · 0 comments
kpgtek commented
When running several times the playbook playbooks/ranger_usersync_config.yml
, permissions and owners of the file /etc/hadoop/conf/core-site.xml
are modified, for example:
[root@master-03 conf]# ll
-rwxr-x---. 1 ranger hadoop 4804 13 déc. 16:00 core-site.xml
-rw-r--r--. 1 root root 17944 13 déc. 16:00 hadoop-env.sh
-rw-r--r--. 1 root root 4511 13 déc. 16:10 hdfs-site.xml
-rw-r--r--. 1 root root 13401 13 déc. 16:00 log4j.properties
-rw-r--r--. 1 root root 3149 13 déc. 16:00 mapred-site.xml
-rw-r--r--. 1 root root 188 13 déc. 16:00 rack_topology.data
-rwxr-xr-x. 1 root root 731 13 déc. 16:00 rack-topology.sh
-rw-r--r--. 1 root root 161 13 déc. 16:09 ssl-client.xml
-rw-r--r--. 1 root root 10267 13 déc. 16:18 yarn-site.xml
[root@master-02 conf]# ll
-rwxr-x---. 1 ranger hadoop 4804 13 déc. 16:00 core-site.xml
-rw-r--r--. 1 root root 17944 13 déc. 16:00 hadoop-env.sh
-rw-r--r--. 1 root root 4511 13 déc. 16:10 hdfs-site.xml
-rw-r--r--. 1 root root 13401 13 déc. 16:00 log4j.properties
-rw-r--r--. 1 root root 3149 13 déc. 16:00 mapred-site.xml
-rw-r--r--. 1 root root 188 13 déc. 16:00 rack_topology.data
-rwxr-xr-x. 1 root root 731 13 déc. 16:00 rack-topology.sh
-rw-r--r--. 1 root root 161 13 déc. 16:09 ssl-client.xml
-rw-r--r--. 1 root root 10267 13 déc. 16:18 yarn-site.xml
This is caused by the following tasks in role tdp.ranger.usersync.config
:
- name: Setup usersync
ansible.builtin.shell: |
export JAVA_HOME={{ java_home }}
export PATH="${JAVA_HOME}/bin:${PATH}"
{{ python_interpreter }} ./setup.py
args:
chdir: "{{ ranger_usersync_install_dir }}"
Thus this could block deployment of other component such as Jupyterhub.