Multi-Category Security (MCS) Guide
Overview
The MCS Plugin is meant to extend the current Slurm functionality related to
job nodes exclusivity and job/node information display privacy.
MCSプラグインは、ジョブノードの排他性とジョブ/ノード情報表示プライバシーに関連する現在のSlurm機能を拡張することを目的としています。
Slurm's OverSubscribe option controls the ability of a partition to
execute more than one job at a time on each resource, no matter "what type"
of job. Slurm job submission clients can also use the --exclusive and
--oversubscribe parameters to request how the job can be
shared. The ExclusiveUser
slurm.conf parameter and the --exclusive=user client parameter value
modifies the exclusivity functionality. With this parameter enabled, the
"type of job" now matters when considering exclusivity, so jobs can share
resources based on job users, meaning that only jobs whose user is the
same can share resources. This indeed adds a new dimension to how Slurm manages
exclusivity. With the introduction of the MCS Plugin, Slurm can now be
configured to associate an MCS_label to jobs and optionally ensure that
nodes can only be shared among jobs having the same label.
This adds even more degrees of freedom to how Slurm manages exclusivity,
providing end users with much more flexibility in this area.
SlurmのOverSubscribeオプションは、ジョブの「タイプ」に関係なく、各リソースで一度に複数のジョブを実行するパーティションの機能を制御します。Slurmジョブ送信クライアントは、-exclusiveおよび--oversubscribeパラメーターを使用して、ジョブの共有方法を要求することもできます。ExclusiveUser slurm.confパラメーターと--exclusive = user clientパラメーター値は、排他機能を変更します。このパラメーターを有効にすると、排他性を考慮するときに「ジョブのタイプ」が重要になるため、ジョブはジョブユーザーに基づいてリソースを共有できます。つまり、同じユーザーのジョブのみがリソースを共有できます。これは確かにSlurmが独占権を管理する方法に新しい次元を追加します。MCSプラグインの導入により、MCS_labelをジョブに関連付けるようにSlurmを構成できるようになりました。また、オプションで、同じラベルを持つジョブ間でのみノードを共有できるようになりました。これにより、Slurmが独占権を管理する方法にさらに自由度が追加され、エンドユーザーにこの領域での柔軟性が大幅に向上します。
Slurm also has the PrivateData slurm.conf
parameter, which is used to control what type of information is hidden from
regular users. Similar to the exclusivity property, the MCS Plugin also
extends the privacy by filtering job and/or node information
based on the user's access to their MCS_label. This means that privacy
is now less restrictive, and information is not just hidden or not to regular
users, but now it is filtered depending on these configurable/requestable
labels in coordination with the PrivateData option.
SlurmにはPrivateData slurm.confパラメーターもあります。これは、通常のユーザーから非表示にする情報の種類を制御するために使用されます。排他プロパティと同様に、MCSプラグインは、MCS_labelへのユーザーのアクセスに基づいてジョブやノードの情報をフィルタリングすることでプライバシーを拡張します。これは、プライバシーの制限が緩和され、情報が非表示になったり、通常のユーザーに表示されなくなったりするのではなく、PrivateDataオプションと連携して、構成可能/要求可能なラベルに基づいてフィルタリングされることを意味します。
Configuration
Two parameters are currently available to configure MCS: MCSPlugin
and MCSParameters.
現在、MCSの構成に使用できるパラメーターは、MCSPluginとMCSParametersの2つです。
- MCSPlugin Specifies which plugin should be used. Plugins are
mutually exclusive, and the type of label to be associated depends
on the loaded plugin.
MCSPlugin使用するプラグインを指定します。プラグインは相互に排他的であり、関連付けられるラベルのタイプは、ロードされたプラグインによって異なります。 - mcs/none is the default and disables MCS labels and functionality.
mcs / noneがデフォルトであり、MCSラベルと機能を無効にします。
- mcs/account MCS labels can only take a value equal to the job's
--account. NOTE: this option requires enabling of accounting.
mcs / account MCSラベルは、ジョブの--accountと等しい値のみを取ることができます。注:このオプションでは、アカウンティングを有効にする必要があります。
- mcs/group MCS labels can only take a value equal to the job's user
group.
mcs / group MCSラベルは、ジョブのユーザーグループと等しい値のみを取ることができます。
- mcs/user MCS labels can only take a value equal to the username of
the job's --uid.
mcs / user MCSラベルは、ジョブの--uidのユーザー名に等しい値のみを取ることができます。
MCS_labels on jobs can be displayed through 'squeue' with the format option
mcslabel or through 'scontrol show job'. Nodes also acquire a MCS_label,
which is inherited from the allocated job's MCS_label. The node's label can be
displayed with 'scontrol show nodes'. The 'sview' command can also be used to
see these MCS_labels.
ジョブのMCS_labelsは、フォーマットオプションmcslabelを指定した「squeue」または「scontrol show job」を使用して表示できます。ノードは、割り当てられたジョブのMCS_labelから継承されたMCS_labelも取得します。ノードのラベルは、「scontrol show nodes」で表示できます。'sview'コマンドを使用して、これらのMCS_labelsを表示することもできます。
Users may either request a particular category label for a job (through the
--mcs-label option), or use the default value generated by the specific
MCS plugin implementation. So labels can be configured to be enforced or set
on demand, and the specific MCS Plugin is responsible for checking the validity
of these labels. When enforced, the MCS Plugin implementation will always
associate a MCS label to a submited job, either the default value or the one
requested by the user (if it's considered correct).
ユーザーは、ジョブの特定のカテゴリラベルを要求するか(--mcs-labelオプションを使用)、または特定のMCSプラグイン実装によって生成されたデフォルト値を使用できます。そのため、ラベルを強制またはオンデマンドで設定するように構成でき、特定のMCSプラグインがこれらのラベルの有効性をチェックします。強制されると、MCSプラグイン実装は、MCSラベルを常にデフォルト値またはユーザーが要求したもの(正しいと見なされた場合)のいずれかで送信されたジョブに関連付けます。
The selection (exclusivity) of nodes can be filtered on MCS labels either
on demand (ondemand) or always (select) or never (noselect). Users can force
the filter with the --exclusive=mcs option (except if noselect mode is
enabled).
ノードの選択(排他性)は、オンデマンド(オンデマンド)、常時(選択)、または常時(選択なし)のいずれかで、MCSラベルでフィルタリングできます。ユーザーは--exclusive = mcsオプションでフィルターを強制できます(noselectモードが有効になっている場合を除く)。
Label enforcement, node selection filtering policy, private data based on
labels and a list of user groups allowed to be mapped to MCS labels can be
configured through MCSParameters option.
ラベル適用、ノード選択フィルタリングポリシー、ラベルに基づくプライベートデータ、およびMCSラベルへのマッピングが許可されているユーザーグループのリストは、MCSParametersオプションを使用して構成できます。
- MCSParameters Specifies the options to pass to the specific MCS
Plugin implementation. Options should satisfy the following expression:
MCSParameters特定のMCSプラグイン実装に渡すオプションを指定します。オプションは次の式を満たす必要があります。
"[ondemand|enforced][,noselect|select|ondemandselect][,privatedata]:[mcs_plugin_parameters]". The defaults are "ondemand,ondemandselect" and no privatedata.
「[オンデマンド|強制] [、noselect | select | ondemandselect] [、privatedata]:[mcs_plugin_parameters]」。デフォルトは "ondemand、ondemandselect"であり、privatedataはありません。
- ondemand|enforced set MCS label on jobs either on demand (using
--mcs-label option) or always
オンデマンド|オンデマンド(--mcs-labelオプションを使用)または常にジョブの強制MCSラベルを設定 - noselect|select|ondemandselect select nodes with filter on MCS
label: never, always or on demand (using --exclusive=mcs option)
noselect | select | ondemandselect MCSラベルにフィルターを使用してノードを選択:決して、常に、またはオンデマンド(--exclusive = mcsオプションを使用) - privatedata accordingly with PrivateData specific option:
PrivateData固有のオプションに応じたprivatedata:
-
if MCS' privatedata and PrivateData's privatedata=jobs, jobs information is
filtered based on their MCS labels
MCSのprivatedataおよびPrivateDataのprivatedata = jobsの場合、ジョブ情報はMCSラベルに基づいてフィルタリングされます
-
if MCS' privatedata and PrivateData's privatedata=nodes, nodes informations is
filtered based on their MCS labels
MCSのprivatedataおよびPrivateDataのprivatedata = nodesの場合、ノード情報はMCSラベルに基づいてフィルタリングされます
-
if MCS' privatedata and PrivateData's privatedata=jobs, jobs information is
filtered based on their MCS labels
- mcs_plugin_parameters Only mcs/group is currently supporting this
option. It can be used to specify the list of user groups (separated by the
'|' character) that are allowed to be mapped to MCS labels by the
mcs/group plugin.
mcs_plugin_parameters mcs / groupのみが現在このオプションをサポートしています。これを使用して、mcs / groupプラグインによってMCSラベルへのマッピングが許可されているユーザーグループ(「|」文字で区切られている)のリストを指定できます。
リクエストや設定が異なると、ユースケースの組み合わせも異なります。次の表は、これらのユースケースのサブセットで期待される動作(排他性に関連する)をエンドユーザーに理解するのに役立つことを目的としています。
Node filtering: |
Label enforcement: ondemand (MCS_label set only if requested.) |
Label enforcement: enforced (MCS_label is mandatory.) |
noselect | No filter on nodes even if --exclusive=mcs requested. | No filter on nodes even if --exclusive=mcs requested. |
select | Filter on nodes only if job MCS_label is set. | Always filter on nodes. |
ondemandselect | Filter on nodes only if --exclusive=mcs. | Filter on nodes only if --exclusive=mcs. |
Some examples
slurm.conf:
MCSPlugin=mcs/account MCSParameters=enforced,select,privatedataor
MCSPlugin=mcs/group MCSParameters=ondemand,noselect:groupA|groupB|groupCor
MCSPlugin=mcs/user MCSParameters=enforced,select,privatedata
View MCS parameters
Configured MCS parameters can be viewed using the scontrol command.
構成されたMCSパラメーターは、scontrolコマンドを使用して表示できます。
scontrol show config |grep MCS MCSPlugin = mcs/group MCSParameters = ondemand,noselect:groupA|groupB|groupC
Put a mcs_label in job using salloc, sbatch or srun command
salloc、sbatch、またはsrunコマンドを使用してmcs_labelをジョブに入れます
srun -n10 -t 1000 --mcs-label=groupB ./job &
Put a mcs_label in job with exclusivity
mcs_labelを独占的にジョブに入れます
srun -n10 -t 1000 --mcs-label=groupB --exclusive=mcs ./job &
With mcs/account plugin : put a different account/mcs-label in job
mcs / accountプラグインの場合:別のaccount / mcs-labelをジョブに入れます
srun -n10 -t 1000 -A another_account_than_default ./job &
View MCS parameters in usage
The squeue command can also display the MCS with mcslabel
format option
squeueコマンドは、mcslabel形式オプションでMCSを表示することもできます
squeue -O jobid,username,mcslabel JOBID USER MCSLABEL 2 foo groupA 3 bar groupB
The scontrol command will now display the MCS_label
scontrolコマンドはMCS_labelを表示します
scontrol show nodes NodeName=node0001 Arch=x86_64 CoresPerSocket=4 CPUAlloc=0 CPUTot=8 CPULoad=0.01 Features=(null) Gres=(null) NodeAddr=noder0001 NodeHostName=node0001 Version=15.08 OS=Linux RealMemory=23780 AllocMem=0 Sockets=2 Boards=1 State=IDLE ThreadsPerCore=1 TmpDisk=0 Weight=40 Owner=N/A MCS_label=groupA BootTime=2015-08-05T10:14:41 SlurmdStartTime=2015-09-07T13:42:28 CapWatts=n/a CurrentWatts=0 LowestJoules=0 ConsumedJoules=0 ExtSensorsJoules=n/s ExtSensorsWatts=0 ExtSensorsTemp=n/s
MCS Plugin development
Please see the MCS Plugin Programmer Guide
for details on developing additional MCS plugins.
追加のMCSプラグインの開発の詳細については、MCSプラグインプログラマガイドを参照してください。
Last modified 10 October 2019