使用 pcluster update - Amazon ParallelCluster
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

使用 pcluster update

从 2.8.0 Amazon ParallelCluster 版开始,pcluster update分析用于创建当前集群的设置以及配置文件中的设置以发现问题。如果发现任何问题,就会进行报告并显示修复这些问题所要执行的步骤。例如,如果将 compute_instance_type 设置更改为不同的实例类型,则必须先停止计算实例集,然后才能继续更新。此问题发现后即会报告。如果未报告任何阻碍性问题,则会提示您是否要应用更改。

每个设置的文档都定义了该设置的更新策略。

更新策略:可以在更新期间更改这些设置。
更新策略:可以在更新期间更改此设置。

可以更改这些设置,并可使用 pcluster update 更新集群。

更新策略:如果更改此设置,则不允许更新。

如果尚未删除现有集群,则无法更改这些设置。必须恢复更改,或者必须删除集群(使用 pcluster delete),然后在旧集群的位置创建新集群(使用 pcluster create)。

更新策略:在更新期间不分析此设置。

可以更改这些设置,并使用 pcluster update 更新集群。

更新策略:必须停止计算实例集才能更改此设置以进行更新。

当存在计算实例集时,无法更改这些设置。必须恢复更改,或者必须停止计算实例集(使用 pcluster stop),进行更新(使用 pcluster update),然后创建新的计算实例集(使用 pcluster start)。

更新策略:更新期间不能减小此设置。

这些设置可以更改,但不能减小。如果必须减小这些设置,则必须删除集群(使用 pcluster delete),然后创建新集群(使用 pcluster create)。

更新策略:要将队列大小减至当前节点数以下,需要先停止计算实例集。

可以更改这些设置,但如果更改会将队列大小减至当前大小以下,则必须停止计算实例集(使用 pcluster stop),进行更新(使用 pcluster update),然后创建新的计算实例集(使用 pcluster start)。

更新策略:减少队列中静态节点的数量需要先停止计算实例集。

可以更改这些设置,但如果更改会将队列中的静态节点数量减少到当前大小以下,则必须停止计算实例集(使用 pcluster stop),进行更新(使用 pcluster update),然后创建新的计算实例集(使用 pcluster start)。

更新策略:如果更改此设置,则不允许更新。不能强制更新此设置。

如果尚未删除现有集群,则无法更改这些设置。必须恢复更改,或者必须删除集群(使用 pcluster delete),然后在旧集群的位置创建新集群(使用 pcluster create)。

更新策略:如果配置中未指定适用于 Lustre 的 Amazon ParallelCluster 托管 Amazon FSx for Lustre 文件系统,则可以在更新期间更改此设置。

如果未指定 [cluster] fsx_settings,或者如果 fsx_settings[fsx fs] 中的 fsx-fs-id 同时指定挂载现有的外部 FSx for Lustre 文件系统,则可以更改此设置。

下面的示例演示了一个 pcluster update,其中包含一些阻碍更新的更改。

$ pcluster update Validating configuration file /home/username/.parallelcluster/config... Retrieving configuration from CloudFormation for cluster test-1... Found Changes: # section/parameter old value new value -- ------------------------ ------------------------ ------------------------ [cluster default] 01* compute_instance_type t2.micro c4.xlarge 02* ebs_settings ebs2 - [vpc default] 03 additional_sg sg-0cd61884c4ad16341 sg-0cd61884c4ad11234 [ebs ebs2] 04* shared_dir shared my/very/very/long/sha... Validating configuration update... The requested update cannot be performed. Line numbers with an asterisk indicate updates requiring additional actions. Please look at the details below: #01 Compute fleet must be empty to update "compute_instance_type" How to fix: Make sure that there are no jobs running, then run the following command: pcluster stop -c $CONFIG_FILE $CLUSTER_NAME #02 Cannot add/remove EBS Sections How to fix: Revert "ebs_settings" value to "ebs2" #04 Cannot change the mount dir of an existing EBS volume How to fix: Revert "my/very/very/long/shared/dir" to "shared" In case you want to override these checks and proceed with the update please use the --force flag. Note that the cluster could end up in an unrecoverable state. Update aborted.