oznah / slurm-formula Goto Github PK
View Code? Open in Web Editor NEWSaltstack formula for The Simple Linux Utility for Resource Management (Slurm)
License: Apache License 2.0
Saltstack formula for The Simple Linux Utility for Resource Management (Slurm)
License: Apache License 2.0
The general idea, much like other's formulas, is that a base set of defaults (defaults.yaml) are declared which can be overwritten/merged with OS specific settings, which can be overwritten/merged with user provided pillar data. The OS specific setting would be in osmap.yaml. Currently I haven't tested on any OS other than RHEL, but it is possible that we would need something different for a different OS. The problem is, when I add key/value pairs in the osmap, it breaks the rendering of the defaults (ie. it doesn't merge, it overwrites).
Example:
cat defaults.yaml
slurm:
global:
ControlMachine: linux0
MpiDefault: none
ProctrackType: proctrack/pgid
ReturnToService: 1
SlurmctldPidFile: /var/run/slurmctld.pid
SlurmdPidFile: /var/run/slurmd.pid
SlurmdSpoolDir: /var/spool/slurmd
SlurmUser: slurm
In this example if I wanted to override SlurmUser and I put the following in slurm pillar, it works as expected.
cat pillar/slurm/init.sls
slurm:
global:
SlurmUser: foo
The place where this info is used slurm/files/slurm.conf.jinja, renders the config correctly and you would get.
cat /etc/slurm/slurm.conf
# Dynamic slurm.conf file generated by salt-minion(1)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
## BASE ##
ControlMachine=linux0
MpiDefault=none
ProctrackType=proctrack/pgid
ReturnToService=1
SlurmctldPidFile=/var/run/slurmctld.pid
SlurmdPidFile=/var/run/slurmd.pid
SlurmdSpoolDir=/var/spool/slurmd
SlurmUser=foo
But if I try to override that default setting in the osmap. The conf file gets mangled. Ie. it removes everything except what I specify in the osmap. It doesn't merge.
Example
cat osmap.yaml
RedHat:
slurm:
global:
SlurmUser: foo
The above would render the config file like so, assuming nothing is in the pillar.
cat /etc/slurm/slurm.conf
# Dynamic slurm.conf file generated by salt-minion(1)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
## BASE ##
SlurmUser=foo
This must be something simple. It has something to do with the nested yaml defaults, but I can get it to do what I think it should. Any help would be greatly appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.