GithubHelp home page GithubHelp logo

oznah / slurm-formula Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 52 KB

Saltstack formula for The Simple Linux Utility for Resource Management (Slurm)

License: Apache License 2.0

SaltStack 9.41% HTML 2.74% Python 21.64% Shell 66.20%

slurm-formula's People

Contributors

jennywatuncch avatar oznah avatar sfishback avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

griffji

slurm-formula's Issues

Merging in map.jinja not working as expected

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.