-
Notifications
You must be signed in to change notification settings - Fork 16
Issue number: 90 - fss mount on all worker nodes #91
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
Merged
OguzPastirmaci
merged 7 commits into
oracle-quickstart:main
from
subburamoracle:fssmount_worker
Dec 9, 2025
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
372cb6d
Add files via upload
subburamoracle d211acf
Update oke-fss-mount.sh
subburamoracle 8f80f9b
Issue number:90
subburamoracle 18b44ba
Issue number:90
subburamoracle 2f01ef9
mend
subburamoracle 92d9b72
Issue number:90
subburamoracle c4498e3
Issue number:90
subburamoracle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Variables (set these to your OCI FSS details) | ||
| MOUNT_TARGET_IP="$3" # IP address of OCI FSS mount target | ||
| EXPORT_PATH="$1" # Export path of FSS (from OCI Console) | ||
| MOUNT_POINT="$2" # Local directory to mount FSS | ||
|
|
||
| # Install NFS utils on yum or apt-get systems | ||
| if command -v yum >/dev/null 2>&1; then | ||
| yum install -y nfs-utils | ||
| echo "Installed nfs-utils via yum" | ||
| elif command -v apt-get >/dev/null 2>&1; then | ||
| # Wait for apt lock and install the package | ||
| while fuser /var/{lib/{dpkg/{lock,lock-frontend},apt/lists},cache/apt/archives}/lock >/dev/null 2>&1; do | ||
| echo "Waiting for dpkg/apt lock" | ||
| sleep 1 | ||
| done | ||
| apt-get update | ||
| apt-get install -y nfs-common | ||
| echo "Installed nfs-common via apt-get" | ||
| fi | ||
|
|
||
| # Create mount point directory if it doesn't exist | ||
| mkdir -p "$MOUNT_POINT" | ||
|
|
||
| # Mount the NFS share | ||
| mount -t nfs -o vers=3 "$MOUNT_TARGET_IP:$EXPORT_PATH" "$MOUNT_POINT" | ||
| if [ $? -eq 0 ]; then | ||
| echo "Successfully mounted $MOUNT_TARGET_IP:$EXPORT_PATH at $MOUNT_POINT" | ||
| else | ||
| echo "Failed to mount $MOUNT_TARGET_IP:$EXPORT_PATH" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Add entry to /etc/fstab for re-mount at boot (if not already present) | ||
| if ! grep -q "$MOUNT_TARGET_IP:$EXPORT_PATH" /etc/fstab; then | ||
| echo "$MOUNT_TARGET_IP:$EXPORT_PATH $MOUNT_POINT nfs vers=3,_netdev 0 0" >> /etc/fstab | ||
| echo "Added mount entry to /etc/fstab" | ||
| else | ||
| echo "Mount entry already exists in /etc/fstab" | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
|
|
||
| locals { | ||
| create_workers = true | ||
| fss_mount_ip = try(data.oci_core_private_ip.fss_mt_ip[0].ip_address, "") | ||
| ssh_authorized_keys = compact([ | ||
| trimspace(local.ssh_public_key), | ||
| ]) | ||
|
|
@@ -25,6 +26,13 @@ locals { | |
| var.nvme_raid_level, | ||
| ) : "" | ||
|
|
||
| #fss mounting on worker nodes | ||
|
|
||
| runcmd_fss_mount = var.create_fss && local.fss_mount_ip != "" && local.fss_export_path != "" ? format( | ||
| "curl -sL -o /var/run/oke-fss-mount.sh https://raw.githubusercontent.com/subburamoracle/oci-hpc-oke/refs/heads/fssmount_worker/files/oke-fss-mount.sh && (bash /var/run/oke-fss-mount.sh '%v' '%v' '%v' || echo 'Error initializing RAID' >&2)", | ||
|
||
| local.fss_export_path, var.fss_mount_path, local.fss_mount_ip | ||
| ) : "" | ||
|
|
||
| write_files = [ | ||
| { | ||
| content = local.cluster_apiserver, | ||
|
|
@@ -43,6 +51,7 @@ locals { | |
| runcmd = compact([ | ||
| local.runcmd_nvme_raid, | ||
| local.runcmd_bootstrap, | ||
| local.runcmd_fss_mount | ||
| ]) | ||
| write_files = local.write_files | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add
nconnect=16to mount options here and in fstab?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @OguzPastirmaci i have made the required changes. Could you please review the changes for the merge?