Slurmctld Generic Plugin Programmer Guide
Overview
This document describes slurmctld daemon's generic plugins and the API that
defines them. It is intended as a resource to programmers wishing to write
their own slurmctld generic plugins. This is version 100 of the API.
このドキュメントでは、slurmctldデーモンの汎用プラグインとそれらを定義するAPIについて説明します。これは、独自のslurmctld汎用プラグインを作成したいプログラマへのリソースとして意図されています。これはAPIのバージョン100です。
The slurmctld generic plugin must conform to the
Slurm Plugin API with the following specifications:
slurmctld汎用プラグインは、次の仕様のSlurm Plugin APIに準拠している必要があります。
const char plugin_name[]="full text name"
A free-formatted ASCII text string that identifies the plugin.
プラグインを識別する自由形式のASCIIテキスト文字列。
const char
plugin_type[]="major/minor"
The major type must be "slurmctld_plugstack."
The minor type can be any suitable name for the type of slurmctld package.
主なタイプは「slurmctld_plugstack」である必要があります。マイナータイプは、slurmctldパッケージのタイプに適した名前にすることができます。
Slurm can be configured to use multiple slurmctld_plugstack plugins if desired.
Slurmは、必要に応じて複数のslurmctld_plugstackプラグインを使用するように構成できます。
const uint32_t plugin_version
If specified, identifies the version of Slurm used to build this plugin and
any attempt to load the plugin from a different version of Slurm will result
in an error.
指定した場合、このプラグインのビルドに使用されたSlurmのバージョンを識別し、異なるバージョンのSlurmからプラグインをロードしようとすると、エラーが発生します。
If not specified, then the plugin may be loaded by Slurm commands and
daemons from any version, however this may result in difficult to diagnose
failures due to changes in the arguments to plugin functions or changes
in other Slurm functions used by the plugin.
指定されていない場合、プラグインはSlurmコマンドとデーモンによって任意のバージョンから読み込まれる可能性がありますが、プラグイン関数の引数の変更やプラグインで使用される他のSlurm関数の変更が原因で、障害の診断が困難になる可能性があります。
API Functions
int init (void)
Description:
Called when the plugin is loaded, before any other functions are
called. Put global initialization here.
プラグインがロードされたとき、他の関数が呼び出される前に呼び出されます。ここにグローバル初期化を配置します。
Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.
void fini (void)
Description:
Called when the plugin is removed. Clear any allocated storage here.
プラグインが削除されたときに呼び出されます。ここで割り当て済みのストレージをすべてクリアします。
Returns: None.
List slurmctld_plugstack_p_get_config (void)
Description:
Called when there's a REQUEST_BUILD_INFO RPC call. It must fill a List with
config_key_pair_t elements that represents the configurable parameters of
the plugin.
REQUEST_BUILD_INFO RPC呼び出しがあるときに呼び出されます。プラグインの構成可能なパラメーターを表すconfig_key_pair_t要素をリストに入力する必要があります。
Normally used when for scontrol and sview to dump the configuration.
通常、scontrolおよびsviewが構成をダンプするときに使用されます。
Returns:
List of keyword - value pairs.
キーワードのリスト-値のペア。
Note: These init and fini functions are not the same as those
described in the dlopen (3) system library.
注:これらのinitおよびfini関数は、dlopen(3)システムライブラリで説明されているものと同じではありません。
The C run-time system co-opts those symbols for its own initialization.
Cランタイムシステムは、これらのシンボルを独自の初期化用にco-optします。
The system _init() is called before the Slurm
init(), and the Slurm
fini() is called before the system's
_fini().
システムの_init()はSlurm init()の前に呼び出され、Slurm fini()はシステムの_fini()の前に呼び出されます。
The init function will be called when the slurmctld daemon begins accepting RPCs.
slurmctldデーモンがRPCの受け入れを開始すると、init関数が呼び出されます。
The fini function will be called when the slurmctld daemon stops accepting RPCs.
slurmctldデーモンがRPCの受け入れを停止すると、fini関数が呼び出されます。
Other functions can be called at any time.
他の関数はいつでも呼び出すことができます。
In the case of the backup slurmctld daemon, the init and fini functions may
be called multiple times (when it assumes control functions and then when it
relinquishes them to the primary slurmctld daemon).
バックアップslurmctldデーモンの場合、init関数とfini関数は複数回呼び出される可能性があります(制御関数を想定してから、プライマリslurmctldデーモンにそれらを放棄する場合)。
Last modified 24 January 2018