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

CASMPET-7209 add instructions to mount admin-tools bucket if desired #5314

Merged
merged 5 commits into from
Sep 6, 2024

Conversation

leliasen-hpe
Copy link
Contributor

@leliasen-hpe leliasen-hpe commented Aug 22, 2024

Description

In CSM 1.2 and CSM 1.3, the admin-tools s3 bucket was mounted. In CSM 1.4+, this bucket is no longer mounted. This PR updates documentation so that the admin-tools bucket can be manually mounted if desired.

Tested 3 different test cases.

  1. Admin-tools bucket was not mounted and no entry was in /etc/fstab.

    Configuring for admin-tools S3 bucket at /var/lib/admin-tools for admin-tools S3 user
    Mounting bucket: admin-tools at /var/lib/admin-tools
    Adding fstab entry for admin-tools S3 bucket at /var/lib/admin-tools for admin-tools S3 user
    Set cache pruning for admin-tools to 5G of the 200G volume (every 2nd hour)
    Done mounting admin-tools S3 bucket
    
    /etc/fstab has the following content:
    sds /var/opt/cray/sdu/collection-mount fuse.s3fs _netdev,allow_other,passwd_file=/root/.sds.s3fs,url=http://rgw-vip.nmn,use_path_request_style,use_cache=/var/lib/s3fs_cache,check_cache_dir_exist,use_xattr,uid=2370,gid=2370,umask=0007,allow_other 0 0
    config-data /var/opt/cray/config-data fuse.s3fs _netdev,allow_other,passwd_file=/root/.config-data.s3fs,url=http://rgw-vip.nmn,use_path_request_style,use_xattr 0 0
    admin-tools /var/lib/admin-tools fuse.s3fs _netdev,allow_other,passwd_file=/root/.admin-tools.s3fs,url=http://rgw-vip.nmn,use_path_request_style,use_cache=/var/lib/s3fs_cache,check_cache_dir_exist,use_xattr 0 0
    admin-tools was successfully added to /etc/fstab
    
    The following s3fs mounts exist:
    s3fs on /var/opt/cray/sdu/collection-mount type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
    s3fs on /var/opt/cray/config-data type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
    s3fs on /var/lib/admin-tools type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
    /var/lib/admin-tools is an s3fs mount
    
    Successfully mounted admin-tools bucket
  2. Admin-tools bucket was already mounted

    ncn-m001:~/leliasen # ./mount-admin-tools-bucket.sh
    Configuring for admin-tools S3 bucket at /var/lib/admin-tools for admin-tools S3 user
    Mounting bucket: admin-tools at /var/lib/admin-tools
    s3fs: MOUNTPOINT directory /var/lib/admin-tools is not empty. if you are sure this is safe, can use the 'nonempty' mount option.
    Error: Check that admin-tools is not already mounted and /var/lib/admin-tools is empty.
    ncn-m001:~/leliasen # echo $?
    1
  3. Admin-tools bucket was not mounted but and entry already existed in /etc/fstab

    ncn-m001:~/leliasen # ./mount-admin-tools-bucket.sh
    Configuring for admin-tools S3 bucket at /var/lib/admin-tools for admin-tools S3 user
    Mounting bucket: admin-tools at /var/lib/admin-tools
    Adding fstab entry for admin-tools S3 bucket at /var/lib/admin-tools for admin-tools S3 user
    An entry in /etc/fstab already exists for admin-tools /var/lib/admin-tools fuse.s3fs
    Set cache pruning for admin-tools to 5G of the 200G volume (every 2nd hour)
    Done mounting admin-tools S3 bucket
    
    /etc/fstab has the following content:
    sds /var/opt/cray/sdu/collection-mount fuse.s3fs _netdev,allow_other,passwd_file=/root/.sds.s3fs,url=http://rgw-vip.nmn,use_path_request_style,use_cache=/var/lib/s3fs_cache,check_cache_dir_exist,use_xattr,uid=2370,gid=2370,umask=0007,allow_other 0 0
    config-data /var/opt/cray/config-data fuse.s3fs _netdev,allow_other,passwd_file=/root/.config-data.s3fs,url=http://rgw-vip.nmn,use_path_request_style,use_xattr 0 0
    admin-tools /var/lib/admin-tools fuse.s3fs _netdev,allow_other,passwd_file=/root/.admin-tools.s3fs,url=http://rgw-vip.nmn,use_path_request_style,use_cache=/var/lib/s3fs_cache,check_cache_dir_exist,use_xattr 0 0
    admin-tools was successfully added to /etc/fstab
    
    The following s3fs mounts exist:
    s3fs on /var/opt/cray/sdu/collection-mount type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
    s3fs on /var/opt/cray/config-data type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
    s3fs on /var/lib/admin-tools type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
    /var/lib/admin-tools is an s3fs mount
    
    Successfully mounted admin-tools bucket

Checklist

  • If I added any command snippets, the steps they belong to follow the prompt conventions (see example).
  • If I added a new directory, I also updated .github/CODEOWNERS with the corresponding team in Cray-HPE.
  • My commits or Pull-Request Title contain my JIRA information, or I do not have a JIRA.

@leliasen-hpe leliasen-hpe force-pushed the CASMPET-7209 branch 2 times, most recently from 26bfaa0 to 5e4184d Compare August 22, 2024 20:58
@leliasen-hpe
Copy link
Contributor Author

/backport release/1.5

@leliasen-hpe
Copy link
Contributor Author

/backport release/1.4

Copy link
Contributor

Backporting into branch release/1.5 was successful. New PR: #5320

Copy link
Contributor

Backporting into branch release/1.4 was successful. New PR: #5321

Copy link
Contributor

@rustydb rustydb left a comment

Choose a reason for hiding this comment

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

Left some feedback from nits to defensive programming enhancements.

scripts/mount-admin-tools-bucket.sh Outdated Show resolved Hide resolved
scripts/mount-admin-tools-bucket.sh Outdated Show resolved Hide resolved
scripts/mount-admin-tools-bucket.sh Outdated Show resolved Hide resolved
scripts/mount-admin-tools-bucket.sh Outdated Show resolved Hide resolved
scripts/mount-admin-tools-bucket.sh Outdated Show resolved Hide resolved
scripts/mount-admin-tools-bucket.sh Outdated Show resolved Hide resolved
scripts/mount-admin-tools-bucket.sh Outdated Show resolved Hide resolved
scripts/mount-admin-tools-bucket.sh Outdated Show resolved Hide resolved
scripts/mount-admin-tools-bucket.sh Outdated Show resolved Hide resolved
scripts/mount-admin-tools-bucket.sh Show resolved Hide resolved
@rustydb
Copy link
Contributor

rustydb commented Aug 30, 2024

Just shfmt and shellcheck need work and then we can backport to 1.5 and 1.4.

@leliasen-hpe
Copy link
Contributor Author

/backport release/1.5

Copy link
Contributor

github-actions bot commented Sep 4, 2024

Backporting into branch release/1.5 was successful. New PR: #5355

@leliasen-hpe
Copy link
Contributor Author

/backport release/1.4

Copy link
Contributor

github-actions bot commented Sep 4, 2024

Backporting into branch release/1.4 was successful. New PR: #5356

@rustydb rustydb merged commit 18b44e9 into release/1.6 Sep 6, 2024
7 of 8 checks passed
@rustydb rustydb deleted the CASMPET-7209 branch September 6, 2024 21:21
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.

4 participants