排解 Google Distributed Cloud 更新問題

您可以診斷並解決 Google Distributed Cloud 叢集更新期間發生的問題,例如作業逾時、設定變更遭拒或忽略,以及預檢失敗。如要進一步瞭解可以更新哪些設定,請參閱「叢集中可以和無法更新的項目」。

更新逾時

系統會根據要更新的資源,動態計算更新逾時時間。不過,計算結果不一定準確。更新逾時後,系統會顯示類似下列的錯誤:

  • 在使用者叢集中:

    Failed to update the cluster:...timed out waiting for the condition...
    
  • 在管理員叢集中:

    Failed to update the admin cluster:...timed out waiting for the condition...
    

您可以放心忽略這類逾時錯誤,並重試更新指令。如果重試指令後再次逾時,並出現相同的錯誤訊息,請與 Cloud Customer Care 聯絡。

更新包含多項變更

gkectl update admin 和 gkectl update cluster 指令不支援在單一指令中更新多項設定。如果設定檔變更了多項設定,指令會傳回類似以下範例的錯誤:

Update summary for cluster X:
    antiAffinityGroups: enabled to be set to true from false          &config.AAGSpec{
        -   Enabled: false,
        +   Enabled: true,
          }
    user master cpu to be set to 5 from 4          config.NodePoolProps{
            Role:        "master",
            MachineType: "standard-master",
        -   CPUs:        4,
        +   CPUs:        5,
            MemoryMB:    8192,
            Replicas:    3,
            ... // 2 identical fields
            Labels:         nil,
            NodeTaints:     nil,
        -   Vsphere:        nil,
        &config.NodePoolVsphereSpec{Datastore: "lifecycle-workloads1-datastore1"},
        +   Vsphere:        nil,
            BootDiskSizeGB: nil,
            OSImageType:    "",
            ... // 5 identical fields
          }

Exit with error:
Failed to update the cluster: the update contains multiple changes. Please
update only one feature at a time

這項錯誤可能由多種原因造成,包括:

  • 錯誤或設定不當。
  • 您先前已使用設定差異執行 gkectl upgrade,並預期系統會套用變更。
    • gkectl upgrade 不會套用任何設定差異,只會提高版本。
  • 您先前編輯了其他功能更新的設定,但忘記執行 gkectl update 指令。

如果遇到這項錯誤,請查看錯誤訊息中的差異,並使用多個 gkectl update 指令逐一更新必要設定。為協助找出變更,您可以使用 gkectl get-config 從叢集產生設定檔,並查看現有狀態和設定。

不支援的變更

gkectl update cluster 和 gkectl update admin 指令會忽略不支援的變更,並顯示類似下列範例的錯誤訊息:

detected unsupported changes: (-current +desired)
    ...
-   AdvancedNetworking:       &true,
+   AdvancedNetworking:       &false,
    ...
, which will be ignored

如果遇到這項錯誤,請查看錯誤訊息中的差異,並執行下列動作:

  • 如果變更並非預期,請編輯設定 YAML 檔案,並僅更新正確、預期的變更。
    • 在上述範例中,如果您不打算停用 AdvancedNetworking,請在設定 YAML 檔案中設定 advancedNetworking: true。
  • 如果變更是刻意為之,則錯誤表示不支援該變更。執行下列其中一項操作:

OS 映像檔不存在

gkectl update cluster 和 gkectl update admin 指令可能會失敗,並顯示類似下列範例的 OS Images 預檢失敗訊息:

  • 在使用者叢集中:

    - Validation Category: OS Images
        - [FAILURE] User cluster OS images exist: os images  [xxxx] don't exist,
        please run `gkectl prepare` to upload os images.
    
  • 在管理員叢集中:

    - Validation Category: OS Images
        - [FAILURE] Admin cluster OS images exist: os images [xxxx] don't exist,
        please run `gkectl prepare` to upload os images.
    

如果 OS 映像檔在 vCenter 環境中意外遭到移除 (例如定期清理工作),就可能發生這些錯誤。

如要重新匯入 OS 映像檔,請執行下列 gkectl prepare 指令:

gkectl prepare \
    --bundle-path /var/lib/gke/bundles/gke-onprem-vsphere-TARGET_VERSION.tgz \
    --kubeconfig ADMIN_CLUSTER_KUBECONFIG \
    --skip-upload-container-images

資料儲存庫可用空間不足,無法建立新的節點集區

新增節點集區時,gkectl update cluster 指令可能會失敗,並顯示類似下列範例的 VSphere Datastore FreeSpace 預檢錯誤:

  - [FAILURE] VSphere Datastore FreeSpace: vCenter datastore: xxxx insufficient
  FreeSpace, requires at least xxx  GB

這項失敗表示資料儲存庫沒有足夠的可用空間,無法建立新的節點集區。如要提供足夠空間,確保更新順利完成,請執行下列任一操作:

  • 釋出資料儲存庫空間。
  • 為節點集區設定不同的 nodePools[].vsphere.datastore 資料儲存庫。

將 IP 位址新增至 MetalLB IP 位址集區後,使用者叢集更新失敗

在進階叢集中,您無法變更 loadBalancer.metalLB.addressPools 中現有位址集區的 IP 位址。在 1.33 以上版本中,所有新叢集都是進階叢集。如果您將 IP 位址新增至現有位址集區並執行 gkectl update cluster,系統會接受並儲存新設定,但更新作業稍後會失敗,使用者叢集會維持在 UPDATING 狀態。更新失敗,並顯示類似以下的錯誤:

admission webhook "vcluster.kb.io" denied the request: Cluster.baremetal.cluster.gke.io "CLUSTER_NAME" is invalid: spec.loadBalancer.addressPools: Forbidden: Fields should be immutable. ... If you want to add new addresses for load balancer, please add a new address pool with new addresses instead of updating an existing address pool.

如要新增 IP 位址,請新增包含新 IP 位址的位址集區,並保留現有的位址集區。詳情請參閱「更新 MetalLB」。

如果使用者叢集已卡在 UPDATING 狀態,請勿從使用者叢集設定檔中移除新增的 IP 位址,因為系統也會拒絕從現有位址集區中移除 IP 位址。請改為聯絡 Cloud Customer Care 團隊,尋求復原叢集的協助。

後續步驟

如需其他協助,請與 Cloud Customer Care 團隊聯絡。

您也可以參閱「取得支援」,進一步瞭解支援資源,包括:

  • 建立客服案件的需求條件。
  • 工具:協助您疑難排解,例如記錄和指標。
  • 支援的 Google Distributed Cloud for VMware (僅限軟體) 元件、版本和功能。