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

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

使用 pcluster update

从Amazon ParallelCluster版本 2.8.0 开始,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)一个新集群。

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

如果[cluster]fsx_settings未指定此设置,或者将两者都fsx_settings指定为为 Lustre 文件系统装载现有的外部 FSx,则可以更改此设置。fsx-fs-id[fsx fs]

此示例演示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.