

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# `pcluster update`
<a name="pcluster.update"></a>

分析組態檔案，以判斷叢集是否可以安全地更新。如果分析判斷叢集可以更新，系統會提示您確認變更。如果分析顯示叢集無法更新，則衝突來源的組態設定會列舉詳細資訊。如需詳細資訊，請參閱[使用 `pcluster update`](using-pcluster-update.md)。

```
pcluster update [ -h ] [ -c CONFIG_FILE ] [ --force ] [ -r REGION ] [ -nr ]
                [ -nw ] [ -t CLUSTER_TEMPLATE ] [ -p EXTRA_PARAMETERS ] [ -rd ]
                [ --yes ] cluster_name
```

## 定位引數
<a name="pcluster.update.arg"></a>

***cluster\$1name***  
指定要更新的叢集名稱。

## 具名引數
<a name="pcluster.update.namedarg"></a>

**-h, --help**  
顯示 的說明文字`pcluster update`。

**-c *CONFIG\$1FILE*, --config *CONFIG\$1FILE***  
指定要使用的替代組態檔案。  
預設為 `~/.parallelcluster/config`。

**--force**  
即使一或多個設定有封鎖變更，或需要未完成的動作 （例如停止運算機群） 才能繼續更新，仍啟用更新。這不應與 `--yes`引數結合。

**-r *REGION*, --region *REGION***  
指定 AWS 區域 要使用的 。使用 [`pcluster configure`](pcluster.configure.md)命令預設為 AWS 區域 指定的 。

**-nr, --norollback**  
錯誤時停用 AWS CloudFormation 堆疊轉返。  
預設為 `False`。

**-nw, --nowait**  
表示在處理堆疊命令之後不要等待堆疊事件。  
預設為 `False`。

**-t *CLUSTER\$1TEMPLATE*, --cluster-template *CLUSTER\$1TEMPLATE***  
指定叢集範本使用的區段。

**-p *EXTRA\$1PARAMETERS*, --extra-parameters *EXTRA\$1PARAMETERS***  
將額外的參數新增至堆疊更新。

**-rd, --reset-desired**  
將 Auto Scaling 群組的目前容量重設為初始組態值。  
預設為 `False`。

**--yes**  
自動假設所有提示的答案為是。這不應與 `--force` 引數結合。

```
$ pcluster update -c path/to/config mycluster
Retrieving configuration from CloudFormation for cluster mycluster...
Validating configuration file .parallelcluster/config...
Found Configuration Changes:

#    parameter                   old value    new value
---  --------------------------  -----------  -----------
     [compute_resource default]
01   min_count                   1            2
02   max_count                   5            12

Validating configuration update...
Congratulations! The new configuration can be safely applied to your cluster.
Do you want to proceed with the update? - Y/N: Y
Updating: mycluster
Calling update_stack
Status: parallelcluster-mycluster - UPDATE_COMPLETE
```

當呼叫 命令並開始輪詢該呼叫的狀態時，使用 "Ctrl-C" 結束是安全的。您可以透過呼叫 `pcluster status mycluster` 來返回檢視目前狀態。