Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an initialization action to change the node manager's log directory path to local SSDs #1020

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

datasherlock
Copy link

  • If there are no local SSDs, the script will not add any property to yarn-site and the default boot disk path will be used
  • If there are multiple mounts, it will create a comma separated list of paths for the property based on the MAX_MNT_DISK_FOR_LOGS setting.
  • If MAX_MNT_DISK_FOR_LOGS is greater than the actual disks, then the actual disk count will be used. If not, the configuration will be honoured.
  • The fluentd configuration file is modified to monitor the new path for pushing to Cloud Logging

@datasherlock
Copy link
Author

/gcbrun

@datasherlock
Copy link
Author

@jainyogesh - Can you please help me find a reviewer for this PR?

@jainyogesh
Copy link

@ranu010101 , @vinayakumarb, @medb - can one of you please help review it or suggest another reviewr

- Enclosed variables in {}
- Enclosed variables in double quotes where applicable.
# This function validates the MAX_MNT_DISK_FOR_LOGS variable and ensures that the value is capped at the max disks available
function get_max_local_ssd() {
max_disk_no=0
for line in $(df -h --output=target); do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be doubly sure let us also add the check for device names. Nothing stops someone from creating /mnt directory in root mount

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

df returns only the filesystems and the mounts points they are mounted on. Even if someone were to create a directory called 'mnt' in /, df wouldn't return the path unless there's a device/filesystem mounted at that mount point.

logging/change_to_local_ssd.sh Outdated Show resolved Hide resolved
logging/change_to_local_ssd.sh Outdated Show resolved Hide resolved
@jayadeep-jayaraman
Copy link
Collaborator

jayadeep-jayaraman commented Jan 6, 2023

/gcbrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants