Skip to content

Commit 7078d24

Browse files
authored
Merge pull request #447 from mboisson/client_quotas
Add support for client side quotas
2 parents 2be9ab1 + da22a7a commit 7078d24

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,12 +899,14 @@ This class install NFS and configure an NFS server that will export all volumes
899899
| Variable | Description | Type |
900900
| :-------- | :----------------------------------------------- | :---------------------------- |
901901
| `no_root_squash_tags` | Array of tags identifying instances that can mount NFS exports without root squash | Array[String] |
902+
| `enable_client_quotas` | Enable query of quotas on NFS clients | Boolean |
902903

903904
<details>
904905
<summary>default values</summary>
905906

906907
```yaml
907908
profile::nfs::server::no_root_squash_tags: ['mgmt']
909+
profile::nfs::server::enable_client_quotas: false
908910
```
909911
</details>
910912

data/software_stack/computecanada.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
profile::software_stack::initial_profile: "/cvmfs/soft.computecanada.ca/config/profile/bash.sh"
22
profile::software_stack::lmod_default_modules:
33
- StdEnv/2023
4+
profile::software_stack::extra_site_env_vars:
5+
CC_CLUSTER: "magic_castle"
6+
lookup_options:
7+
profile::software_stack::extra_site_env_vars:
8+
merge: hash
49

510
jupyterhub::kernel::venv::python: /cvmfs/soft.computecanada.ca/easybuild/software/2023/%{facts.cpu_microarch}/Compiler/gcccore/python/3.11.5/bin/python
611
jupyterhub::kernel::venv::prefix: /opt/ipython-kernel-computecanada

site/profile/manifests/nfs.pp

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969

7070
class profile::nfs::server (
7171
Array[String] $no_root_squash_tags = ['mgmt'],
72+
Boolean $enable_client_quotas = false,
7273
Optional[Array[String]] $export_paths = undef,
7374
) {
7475
include profile::volumes
@@ -91,7 +92,28 @@
9192
notify => Service[$nfs::server_service_name],
9293
}
9394

94-
service { ['rpc-statd', 'rpcbind', 'rpcbind.socket']:
95+
if $enable_client_quotas {
96+
package { 'quota-rpc':
97+
ensure => 'installed',
98+
}
99+
service { 'rpc-rquotad':
100+
ensure => 'running',
101+
enable => true,
102+
require => [Service['rpcbind'], Service['rpcbind.socket'], Package['quota-rpc']]
103+
}
104+
service { ['rpcbind', 'rpcbind.socket']:
105+
enable => true,
106+
notify => Service[$nfs::server_service_name],
107+
}
108+
}
109+
else {
110+
service { ['rpcbind', 'rpcbind.socket']:
111+
ensure => stopped,
112+
enable => mask,
113+
notify => Service[$nfs::server_service_name],
114+
}
115+
}
116+
service { 'rpc-statd':
95117
ensure => stopped,
96118
enable => mask,
97119
notify => Service[$nfs::server_service_name],

0 commit comments

Comments
 (0)