Skip to main content

Linter for Slurm configuration files

Project description

Travis CI Status python 3.5, 3.6, 3.7

A Simple linter for Slurm Config Files

Purpose

In my experience it is very easy to make small errors in slurm configuration files, incorrectly listing nodes in the cluster, or failing to assign nodes to partitions, and so on. This package provides a simple command to check slurm files that is suitable for use in automated deployment management.

In addition, a python API is provided allowing checking arbitrary strings of text. Utility functions such as explanding slurm-style hostname lists are also given.

Usage

The slurmlint command takes a slurm configuration file as an argument and returns a simple report with errors (if any). If there were errors then the return code is 1, otherwise 0.

$ slurmlint slurm.conf
753 compute nodes configured

Errors detected:
Line 126 - Duplicate node definition: ng1031, ng908, ng909, ...
Line 127 - Duplicate node definition: ng1031
Line 128 - Duplicate node definition: ng908, ng909, ng910
Line 131 - Defined node has no partition: ng1259
Line 131 - Duplicate node definition: ng1256

Limitations

This utility does not fully understand the grammar of slurm configuration files and does not guarantee the validity of a configuration file. It only serves to help find certain kinds of simple errors.

Hostname Lists

This linter applies stricter rules than Slurm for lists of hostnames. Hostnames must be valid hostnames according to RFC-1123, that is they may contain a-z, 0-9, dot, and the minus sign, at most 253 ASCII characters, and must be comprised of "labels" from 1-63 characters connected by dots.

Hostnames can be separated by commas in a list.

The standard (???) rules for brackets apply. If a list entry uses brackets to denote some numerical range or comma separated list, there must be brackets at the end of the hostname. One can also have a bracketed range somewhere else in the hostname provided that there are brackets at the end. Brackets may contain valid non-negative integers separated by commas, or ranges such as 1-8. A leading zero in a range denotes a fixed width, i.e. 001-020.

Note that this linter does not use the slurm parser and will result in "false positive" warnings where allowed hostname ranges still result in warnings.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slurmlint-0.0.3.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slurmlint-0.0.3-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file slurmlint-0.0.3.tar.gz.

File metadata

  • Download URL: slurmlint-0.0.3.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for slurmlint-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3a417b3d2ed246ed4642fc55c23ca8a1bd709801b31c89fec3698361e925d481
MD5 fd2f4e79d2b5a460acfe4c1890620037
BLAKE2b-256 4478ff4fd1fd7a3bf43479005c0723a6f1d9bf43fd15833b307c6bb34eb946a8

See more details on using hashes here.

File details

Details for the file slurmlint-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: slurmlint-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for slurmlint-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a6d3557228086362e5884ece9c9461268af7f4605fb2c4ef005954acbe81bbc5
MD5 8cc9bfc9b71616e7dc5aa391d91e33da
BLAKE2b-256 cd3c474aaf66f2355a5abcc1e7e6e2f61892d300ccee6f0b3179880ce97a4de9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page