From 1422ac6c001de5e0202ff9a1fa469d04873541a9 Mon Sep 17 00:00:00 2001 From: Dustin Frisch Date: Sat, 11 Nov 2023 17:53:02 +0100 Subject: [PATCH] Flush NSS DBs after ldap sync --- docs/content/first_steps.md | 4 ++-- machines/manager/ldap.nix | 6 ++++++ shared/slurm.nix | 14 +++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/content/first_steps.md b/docs/content/first_steps.md index 1d3cd17..1a39a29 100644 --- a/docs/content/first_steps.md +++ b/docs/content/first_steps.md @@ -35,10 +35,10 @@ Um sich mit der Nutzung des Clusters vertraut zu machen, können Sie einen einfa * Erstellen Sie eine Textdatei namens testjob.sh auf Ihrem Computer. * Öffnen Sie die Datei in einem Texteditor und fügen Sie den folgenden Inhalt ein: ```bash -#!/bin/bash +#!/usr/bin/env bash #SBATCH --job-name=testjob #SBATCH --output=testjob.out -#SBATCH --partition=standard +#SBATCH --partition=all #SBATCH --ntasks=1 #SBATCH --time=00:10:00 diff --git a/machines/manager/ldap.nix b/machines/manager/ldap.nix index c951f01..5888580 100644 --- a/machines/manager/ldap.nix +++ b/machines/manager/ldap.nix @@ -149,6 +149,12 @@ in systemd.services."ldap-sync" = { script = "${ldap-sync}/bin/ldap-sync"; startAt = "hourly"; + + # Flush caches + postStop = '' + ${config.services.nscd.package}/bin/nscd --invalidate=group + ${config.services.nscd.package}/bin/nscd --invalidate=passwd + ''; }; networking.firewall.allowedTCPPorts = [ diff --git a/shared/slurm.nix b/shared/slurm.nix index 60f49a6..1fdd928 100644 --- a/shared/slurm.nix +++ b/shared/slurm.nix @@ -2,6 +2,18 @@ with lib; +let + nodeConfig = concatStringsSep " " (mapAttrsToList + (key: value: "${key}=${toString value}") + { + CPUs = 64; + Boards = 1; + SocketsPerBoard = 4; + CoresPerSocket = 16; + ThreadsPerCore = 1; + }); + +in { services.slurm = { clusterName = "mogli"; @@ -9,7 +21,7 @@ with lib; controlMachine = "manager"; nodeName = map - (node: "${node.config.networking.hostName} CPUs=32") + (node: "${node.config.networking.hostName} ${nodeConfig}") (filter # Filter all nodes that have a tag "node" being a compute node (node: node.config.hpc.node.enable) (attrValues nodes));