Skip to content

Commit

Permalink
Merge pull request #649 from dheren-git/scale_hdfs_dev_master_512
Browse files Browse the repository at this point in the history
[TS009168275] Back-port fix into 5.1.2.x
  • Loading branch information
rajan-mis authored May 17, 2022
2 parents 8602c11 + 96b8dd2 commit 2692624
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions roles/scale_hdfs/cluster/tasks/env_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
state: present
line: "export JAVA_HOME={{ javahome_path }}"
when:
- ansible_fqdn in scale_hdfs_nodes_list
- ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list

- name: "env_setup | HDFS and GPFS bin to PATH"
lineinfile:
path: /root/.bashrc
state: present
line: 'export PATH=$PATH:$JAVA_HOME/bin:/usr/lpp/mmfs/bin:/usr/lpp/mmfs/hadoop/sbin:/usr/lpp/mmfs/hadoop/bin'
when:
- ansible_fqdn in scale_hdfs_nodes_list
- ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list

- name: "env_setup | ulimit tunning"
lineinfile:
Expand All @@ -61,4 +61,4 @@
loop_control:
loop_var: limit_items
when:
- ansible_fqdn in scale_hdfs_nodes_list
- ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list
3 changes: 2 additions & 1 deletion roles/scale_hdfs/node/tasks/yum/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
name: "{{ scale_install_all_packages }}"
state: present
disable_gpg_check: "{{ scale_disable_gpgcheck }}"
when: ansible_fqdn in scale_hdfs_nodes_list or ansible_fqdn in scale_protocol_nodes_list
when: ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list or ansible_fqdn in scale_protocol_nodes_list or inventory_hostname in scale_protocol_nodes_list


12 changes: 6 additions & 6 deletions roles/scale_hdfs/precheck/tasks/java_home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,36 @@
- name: check | Fetch JAVA_HOME path
shell: echo $JAVA_HOME
register: java_path
when: ansible_fqdn in scale_hdfs_nodes_list
when: ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list

- name: check | Check JAVA_HOME path exist
stat:
path: "{{ java_path.stdout }}"
register: java_path_details
when: ansible_fqdn in scale_hdfs_nodes_list
when: ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list

- name: check | Assert JAVA_HOME path exist
assert:
that:
- java_path_details.stat.exists
fail_msg: The JAVA_HOME path does not exists !
when: ansible_fqdn in scale_hdfs_nodes_list
when: ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list

- name: check | Set path of JAVA_HOME
set_fact:
javahome_path: "{{ java_path.stdout }}"
when:
- ansible_fqdn in scale_hdfs_nodes_list
- ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list

- name: check | verify JAVA
command: "ls {{ javahome_path }}/bin/java"
register: jvm_list
when:
- ansible_fqdn in scale_hdfs_nodes_list
- ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list
- javahome_path|length > 0

- fail:
msg: "JAVA_HOME not set properly"
when:
- ansible_fqdn in scale_hdfs_nodes_list
- ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list
- jvm_list.rc != 0

0 comments on commit 2692624

Please sign in to comment.