This is an automated email from the ASF dual-hosted git repository.
arvindsh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluo-muchos.git
The following commit(s) were added to refs/heads/main by this push:
new 8688ab0 Address miscellaneous issues (#437)
8688ab0 is described below
commit 8688ab0f0fd2a6a3378a1caac7f5acf48dd69798
Author: Arvind Shyamsundar <[email protected]>
AuthorDate: Tue Nov 21 15:50:20 2023 -0800
Address miscellaneous issues (#437)
* Address an Ansible deprecation warning by changing the ansible.cfg
file to use `callbacks_enabled`.
* Use native Ansible module to create ADLS Gen2 storage accounts.
* Resize filesystems to match provisioned disk space.
* Move user specific environment (PATH definition) to bashrc to ensure
that SSH command invocation also leverages correct path definition.
---
ansible/conf/ansible.cfg | 2 +-
ansible/roles/azure/tasks/create_adlsgen2.yml | 23 ++++++++---------------
ansible/roles/common/tasks/azure.yml | 1 +
ansible/roles/common/templates/bash_profile | 2 --
ansible/roles/common/templates/bashrc | 7 +++++++
5 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/ansible/conf/ansible.cfg b/ansible/conf/ansible.cfg
index e99d4ed..65e5f0b 100644
--- a/ansible/conf/ansible.cfg
+++ b/ansible/conf/ansible.cfg
@@ -17,5 +17,5 @@
host_key_checking = False
forks = 50
gathering = smart
-callback_whitelist = profile_tasks
+callbacks_enabled = profile_tasks
timeout=30
diff --git a/ansible/roles/azure/tasks/create_adlsgen2.yml
b/ansible/roles/azure/tasks/create_adlsgen2.yml
index 71c783f..d4fedd0 100644
--- a/ansible/roles/azure/tasks/create_adlsgen2.yml
+++ b/ansible/roles/azure/tasks/create_adlsgen2.yml
@@ -69,7 +69,7 @@
set_fact:
InstanceVolumes: "{{ InstanceVolumesManual if
instance_volumes_input.split('|')[0].split(',') == [''] else
InstanceVolumesAuto }}"
-- name: Update instance_volumes_adls in muchos.props
+- name: Update instance_volumes_adls in muchos.props
lineinfile:
path: "{{ deploy_path }}/conf/muchos.props"
regexp: '^instance_volumes_adls\s*=\s*|^[#]instance_volumes_adls\s*=\s*'
@@ -77,21 +77,14 @@
# Not registering variable because storage values are not visible immediately
- name: Create ADLS Gen2 storage account using REST API
- azure_rm_resource:
- resource_group: "{{ resource_group }}"
- provider: Storage
- resource_type: storageAccounts
- resource_name: "{{ item.split('@')[1].split('.')[0] }}"
- api_version: "2019-04-01"
- idempotency: yes
+ azure.azcollection.azure_rm_storageaccount:
state: present
- body:
- sku:
- name: "{{ adls_storage_type }}"
- kind: StorageV2
- properties:
- isHnsEnabled: yes
- location: "{{ location }}"
+ resource_group: "{{ resource_group }}"
+ name: "{{ item.split('@')[1].split('.')[0] }}"
+ type: "{{ adls_storage_type }}"
+ kind: "StorageV2"
+ is_hns_enabled: True
+ location: "{{ location }}"
loop: "{{ InstanceVolumes }}"
# Creating User Assigned identity with vmss_name suffixed by ua-msi if not
specified in muchos.props
diff --git a/ansible/roles/common/tasks/azure.yml
b/ansible/roles/common/tasks/azure.yml
index 20a3104..a69cc72 100644
--- a/ansible/roles/common/tasks/azure.yml
+++ b/ansible/roles/common/tasks/azure.yml
@@ -24,6 +24,7 @@
filesystem:
fstype: xfs
dev: "{{ item.path }}"
+ resizefs: yes
with_items: "{{ files_matched.files }}"
- name: Get UUID
command: "blkid {{ item.path }} -s UUID -o value"
diff --git a/ansible/roles/common/templates/bash_profile
b/ansible/roles/common/templates/bash_profile
index af79087..719140b 100644
--- a/ansible/roles/common/templates/bash_profile
+++ b/ansible/roles/common/templates/bash_profile
@@ -7,8 +7,6 @@ fi
# User specific environment and startup programs
PATH=$JAVA_HOME/bin:$PATH
-PATH=$PATH:$HOME/.local/bin
-PATH=$PATH:$HOME/bin
PATH=$PATH:{{ accumulo_home }}/bin
PATH=$PATH:{{ fluo_home }}/bin
PATH=$PATH:{{ fluo_yarn_home }}/bin
diff --git a/ansible/roles/common/templates/bashrc
b/ansible/roles/common/templates/bashrc
index fd6b387..604aabf 100644
--- a/ansible/roles/common/templates/bashrc
+++ b/ansible/roles/common/templates/bashrc
@@ -5,6 +5,13 @@ if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
+# User specific environment
+if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
+then
+ PATH="$HOME/.local/bin:$HOME/bin:$PATH"
+fi
+export PATH
+
export JAVA_HOME={{ java_home }}
{% if hadoop_major_version == '2' %}