From 759acfdd0a0d23ceed5cc191b786692b7369b20a Mon Sep 17 00:00:00 2001 From: Filippo Giunchedi Date: Tue, 28 Jul 2026 19:06:43 +0200 Subject: [PATCH] switch to maintain-nfs stack-info: PR: https://github.com/toolforge/paws/pull/523, branch: filippog/stack/3 --- paws/codfw.yaml | 4 +-- paws/production.yaml | 4 +-- paws/values.yaml | 62 +++++++++++++++++++------------------------- 3 files changed, 28 insertions(+), 42 deletions(-) diff --git a/paws/codfw.yaml b/paws/codfw.yaml index b50a1861..fe608559 100644 --- a/paws/codfw.yaml +++ b/paws/codfw.yaml @@ -16,8 +16,6 @@ jupyterhub: 00-myConfig: | localdev = False nfs_home = 'pawsdev-nfs.pawsdev.codfw1dev.wikimedia.cloud' - dumps_src1 = 'pawsdev-nfs.pawsdev.codfw1dev.wikimedia.cloud' - dumps_src2 = 'pawsdev-nfs.pawsdev.codfw1dev.wikimedia.cloud' ingress: enabled: true hosts: @@ -28,7 +26,7 @@ jupyterhub: minesweeper: enabled: true maintainDumpsNfs: - enabled: false + enabled: true server: pawsdev-nfs.pawsdev.codfw1dev.wikimedia.cloud affinity: nodeAffinity: diff --git a/paws/production.yaml b/paws/production.yaml index a1a6c280..aacf0fd5 100644 --- a/paws/production.yaml +++ b/paws/production.yaml @@ -16,8 +16,6 @@ jupyterhub: 00-myConfig: | localdev = False nfs_home = 'paws-nfs.svc.paws.eqiad1.wikimedia.cloud' - dumps_src1 = 'clouddumps1001.wikimedia.org' - dumps_src2 = 'clouddumps1002.wikimedia.org' ingress: enabled: true hosts: @@ -28,7 +26,7 @@ jupyterhub: minesweeper: enabled: true maintainDumpsNfs: - enabled: false + enabled: true server: dumps-nfs.wikimedia.org affinity: nodeAffinity: diff --git a/paws/values.yaml b/paws/values.yaml index c911bf25..ee27e147 100644 --- a/paws/values.yaml +++ b/paws/values.yaml @@ -139,44 +139,38 @@ jupyterhub: homenfs = '/srv/paws/project/paws/userhomes/{}'.format(identity['sub']) # Create the homedir so docker doesn't do it as root os.makedirs(homedir, mode=0o755, exist_ok=True) - if localdev == True: - spawner.volumes = [ - { - 'name': 'home', - 'hostPath': { 'path': homenfs } - }, + + # Common spawner volumes from the host. Contents are managed + # by maintain-dumps-nfs: + # * mnt-nfs holds the nfs mount to dumps-nfs.w.o and gets + # re-mounted as needed, hence the mountPropagation option. + # * public-dumps is the public interface and holds a symlink to /mnt/nfs + + spawner.volumes = [ { - 'name': 'dumps', + 'name': 'public-dumps', 'hostPath': { 'path': '/public/dumps' } }, { - 'name': 'dumps-src1', - 'hostPath': { 'path': '/mnt/nfs/dumps-clouddumps1001.wikimedia.org' } + 'name': 'mnt-nfs', + 'hostPath': { 'path': '/mnt/nfs' } }, + ] + + if localdev == True: + spawner.volumes.extend([ { - 'name': 'dumps-src2', - 'hostPath': { 'path': '/mnt/nfs/dumps-clouddumps1002.wikimedia.org' } - } - ] + 'name': 'home', + 'hostPath': { 'path': homenfs } + }, + ]) else: - spawner.volumes = [ + spawner.volumes.extend([ { 'name': 'home', 'nfs': { 'server': nfs_home, 'path': homenfs } }, - { - 'name': 'dumps', - 'nfs': { 'server': dumps_src1, 'path': '/' } - }, - { - 'name': 'dumps-src1', - 'nfs': { 'server': dumps_src1, 'path': '/' } - }, - { - 'name': 'dumps-src2', - 'nfs': { 'server': dumps_src2, 'path': '/' } - } - ] + ]) spawner.volume_mounts = [ { @@ -184,18 +178,14 @@ jupyterhub: 'mountPath': '/home/paws' }, { - 'name': 'dumps', - 'mountPath': '/public/dumps/public', - 'readOnly': True - }, - { - 'name': 'dumps-src1', - 'mountPath': '/mnt/nfs/dumps-clouddumps1001.wikimedia.org', + 'name': 'public-dumps', + 'mountPath': '/public/dumps', 'readOnly': True }, { - 'name': 'dumps-src2', - 'mountPath': '/mnt/nfs/dumps-clouddumps1002.wikimedia.org', + 'name': 'mnt-nfs', + 'mountPath': '/mnt/nfs', + 'mountPropagation': 'HostToContainer', 'readOnly': True }, ]