Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -899,12 +899,14 @@ This class install NFS and configure an NFS server that will export all volumes
| Variable | Description | Type |
| :-------- | :----------------------------------------------- | :---------------------------- |
| `no_root_squash_tags` | Array of tags identifying instances that can mount NFS exports without root squash | Array[String] |
| `enable_client_quotas` | Enable query of quotas on NFS clients | Boolean |

<details>
<summary>default values</summary>

```yaml
profile::nfs::server::no_root_squash_tags: ['mgmt']
profile::nfs::server::enable_client_quotas: false
```
</details>

Expand Down
5 changes: 5 additions & 0 deletions data/software_stack/computecanada.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
profile::software_stack::initial_profile: "/cvmfs/soft.computecanada.ca/config/profile/bash.sh"
profile::software_stack::lmod_default_modules:
- StdEnv/2023
profile::software_stack::extra_site_env_vars:
CC_CLUSTER: "magic_castle"
lookup_options:
profile::software_stack::extra_site_env_vars:
merge: hash

jupyterhub::kernel::venv::python: /cvmfs/soft.computecanada.ca/easybuild/software/2023/%{facts.cpu_microarch}/Compiler/gcccore/python/3.11.5/bin/python
jupyterhub::kernel::venv::prefix: /opt/ipython-kernel-computecanada
Expand Down
24 changes: 23 additions & 1 deletion site/profile/manifests/nfs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@

class profile::nfs::server (
Array[String] $no_root_squash_tags = ['mgmt'],
Boolean $enable_client_quotas = false,
Optional[Array[String]] $export_paths = undef,
) {
include profile::volumes
Expand All @@ -91,7 +92,28 @@
notify => Service[$nfs::server_service_name],
}

service { ['rpc-statd', 'rpcbind', 'rpcbind.socket']:
if $enable_client_quotas {
package { 'quota-rpc':
ensure => 'installed',
}
service { 'rpc-rquotad':
ensure => 'running',
enable => true,
require => [Service['rpcbind'], Service['rpcbind.socket'], Package['quota-rpc']]
}
service { ['rpcbind', 'rpcbind.socket']:
enable => true,
notify => Service[$nfs::server_service_name],
}
}
else {
service { ['rpcbind', 'rpcbind.socket']:
ensure => stopped,
enable => mask,
notify => Service[$nfs::server_service_name],
}
}
service { 'rpc-statd':
ensure => stopped,
enable => mask,
notify => Service[$nfs::server_service_name],
Expand Down