From b937b57766d8165aa1e836dfceb5a47cfe1f275d Mon Sep 17 00:00:00 2001 From: Matthew Benstead Date: Mon, 16 Oct 2023 13:12:54 -0700 Subject: [PATCH 1/4] Add class to bindmount the ephemeral /mnt to /localscratch --- manifests/site.pp | 2 ++ site/profile/manifests/localscratch_mount.pp | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 site/profile/manifests/localscratch_mount.pp diff --git a/manifests/site.pp b/manifests/site.pp index bfc4faf..11d2f7f 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -22,6 +22,7 @@ include profile::ssh::hostbased_auth::client include profile::ceph::client include profile::ccsudo::sudoers + include profile::localscratch::ephemeraldisk } if 'mgmt' in $instance_tags { @@ -59,6 +60,7 @@ include profile::ceph::client include profile::ccsudo::sudoers + include profile::localscratch::ephemeraldisk Class['profile::nfs::client'] -> Service['slurmd'] Class['profile::gpu'] -> Service['slurmd'] diff --git a/site/profile/manifests/localscratch_mount.pp b/site/profile/manifests/localscratch_mount.pp new file mode 100644 index 0000000..765c069 --- /dev/null +++ b/site/profile/manifests/localscratch_mount.pp @@ -0,0 +1,12 @@ +class profile::localscratch::ephemeraldisk { + mount { /localscratch: + ensure => 'mounted', + fstype => 'none', + options => 'rw,bind', + device => "/mnt", + require => [ + File["/mnt"], + File["/localscratch"], + ], + } +} From 64dfabe6846c6b979f782141c7473b386af011de Mon Sep 17 00:00:00 2001 From: Matthew Benstead Date: Mon, 16 Oct 2023 14:06:49 -0700 Subject: [PATCH 2/4] Fix missing/wrong quotes --- site/profile/manifests/localscratch_mount.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/profile/manifests/localscratch_mount.pp b/site/profile/manifests/localscratch_mount.pp index 765c069..4ced5cd 100644 --- a/site/profile/manifests/localscratch_mount.pp +++ b/site/profile/manifests/localscratch_mount.pp @@ -1,12 +1,12 @@ class profile::localscratch::ephemeraldisk { - mount { /localscratch: + mount { '/localscratch': ensure => 'mounted', fstype => 'none', options => 'rw,bind', - device => "/mnt", + device => '/mnt', require => [ - File["/mnt"], - File["/localscratch"], + File['/mnt'], + File['/localscratch'], ], } } From 9edd96d3941067d87d91f6b31b5fd77ae7fdd3a9 Mon Sep 17 00:00:00 2001 From: Matthew Benstead Date: Mon, 16 Oct 2023 14:08:56 -0700 Subject: [PATCH 3/4] Fix trailing whitespace --- site/profile/manifests/localscratch_mount.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/profile/manifests/localscratch_mount.pp b/site/profile/manifests/localscratch_mount.pp index 4ced5cd..490caba 100644 --- a/site/profile/manifests/localscratch_mount.pp +++ b/site/profile/manifests/localscratch_mount.pp @@ -1,4 +1,4 @@ -class profile::localscratch::ephemeraldisk { +class profile::localscratch::ephemeraldisk { mount { '/localscratch': ensure => 'mounted', fstype => 'none', From 06f191a4fcaf444f5f1ff1eb12f560b5c8747576 Mon Sep 17 00:00:00 2001 From: Matthew Benstead Date: Tue, 17 Oct 2023 08:29:49 -0700 Subject: [PATCH 4/4] Remove ephemeral bind mount class from login nodes --- manifests/site.pp | 1 - 1 file changed, 1 deletion(-) diff --git a/manifests/site.pp b/manifests/site.pp index 11d2f7f..ce5f1af 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -22,7 +22,6 @@ include profile::ssh::hostbased_auth::client include profile::ceph::client include profile::ccsudo::sudoers - include profile::localscratch::ephemeraldisk } if 'mgmt' in $instance_tags {