diff --git a/roles/hdfs/common/templates/dfs.exclude.j2 b/roles/hdfs/common/templates/dfs.exclude.j2 index 74c31d83..a14a4476 100644 --- a/roles/hdfs/common/templates/dfs.exclude.j2 +++ b/roles/hdfs/common/templates/dfs.exclude.j2 @@ -1,3 +1,3 @@ -{% for dn in hdfs_datanodes_decommission %} +{% for dn in hdfs_datanodes_decommission | default([]) %} {{ dn }} {% endfor %} diff --git a/roles/utils/hadoop_decommissioning_check/tasks/main.yml b/roles/utils/hadoop_decommissioning_check/tasks/main.yml index 20cc08c9..f3c9af20 100644 --- a/roles/utils/hadoop_decommissioning_check/tasks/main.yml +++ b/roles/utils/hadoop_decommissioning_check/tasks/main.yml @@ -2,6 +2,12 @@ # SPDX-License-Identifier: Apache-2.0 --- +- name: kinit yarn RM + ansible.builtin.command: kinit -kt /etc/security/keytabs/rm.service.keytab rm/{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}@{{ realm }} + become: true + become_user: yarn + changed_when: false + - name: Check yarn node status ansible.builtin.command: yarn node -list -all register: node_output @@ -24,6 +30,12 @@ ansible.builtin.debug: msg: "{{ app_output.stdout }}" +- name: kinit hdfs NN + ansible.builtin.command: kinit -kt /etc/security/keytabs/nn.service.keytab nn/{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}@{{ realm }} + become: true + become_user: hdfs + changed_when: false + - name: Check HDFS datanodes usage ansible.builtin.command: hdfs dfsadmin -report register: storage_output diff --git a/roles/yarn/common/templates/yarn.exclude.j2 b/roles/yarn/common/templates/yarn.exclude.j2 index 656a54ce..a3cb5b2b 100644 --- a/roles/yarn/common/templates/yarn.exclude.j2 +++ b/roles/yarn/common/templates/yarn.exclude.j2 @@ -1,3 +1,3 @@ -{% for nm in yarn_nodemanagers_decommission %} +{% for nm in yarn_nodemanagers_decommission | default([]) %} {{ nm }} {% endfor %}