Skip to content

Commit df163d5

Browse files
committed
add initial support for client side quotas
1 parent ac25b1b commit df163d5

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

README.md

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

826827
<details>
827828
<summary>default values</summary>
828829

829830
```yaml
830831
profile::nfs::server::no_root_squash_tags: ['mgmt']
832+
profile::nfs::server::enable_client_quotas: false
831833
```
832834
</details>
833835

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: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
}
5454

5555
class profile::nfs::server (
56-
Array[String] $no_root_squash_tags = ['mgmt']
56+
Array[String] $no_root_squash_tags = ['mgmt'],
57+
Boolean $enable_client_quotas = false,
5758
) {
5859
include profile::volumes
5960

@@ -75,7 +76,28 @@
7576
notify => Service[$nfs::server_service_name],
7677
}
7778

78-
service { ['rpc-statd', 'rpcbind', 'rpcbind.socket']:
79+
if $enable_client_quotas {
80+
package { 'quota-rpc':
81+
ensure => 'installed'
82+
}
83+
service { 'rpc-rquotad':
84+
ensure => 'running',
85+
enable => true,
86+
require => [Service['rpcbind'], Service['rpcbind.socket'], Package['quota-rpc']]
87+
}
88+
service { ['rpcbind', 'rpcbind.socket']:
89+
enable => true,
90+
notify => Service[$nfs::server_service_name],
91+
}
92+
}
93+
else {
94+
service { ['rpcbind', 'rpcbind.socket']:
95+
ensure => stopped,
96+
enable => mask,
97+
notify => Service[$nfs::server_service_name],
98+
}
99+
}
100+
service { 'rpc-statd':
79101
ensure => stopped,
80102
enable => mask,
81103
notify => Service[$nfs::server_service_name],

0 commit comments

Comments
 (0)