Unable to expand a vSAN stretched cluster in VCF 9.0.2: Cluster name context list null
search cancel

Unable to expand a vSAN stretched cluster in VCF 9.0.2: Cluster name context list null

book

Article ID: 443051

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

When attempting to expand a vSAN stretched cluster in a VMware Cloud Foundation (VCF) 9.0.2 environment, the SDDC Manager expansion workflow fails. The following symptoms are observed:

  • The expansion task fails with an InternalServerError.
  • The /var/log/vmware/vcf/domainmanager/domainmanager.log file contains
    java.lang.NullPointerException similar to the following: ERROR [vcf_dm...] Failed to update cluster java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "nameContextList" is null

    DEBUG [vcf_dm...] Cluster name context list null for cluster [Cluster_Name].

Environment

VCF 9.x

Cause

This stems from a known issue in VMware Cloud Foundation 9.0.0 inventory synchronization process. During sync operations, the name_context metadata is incorrectly stripped from the cluster data model in the SDDC Manager platform database. If a synchronization occurred while the environment was on version 9.0.0, the field remains blank even after upgrading to version 9.0.1 or 9.0.2.

The stretched cluster workflow relies on this name_context metadata to identify and iterate through the availability zone. Because the value is null, the Stretch workflow cannot initialize the necessary iterator, resulting in failure.

Resolution

The issue where inventory synchronization strips metadata from the name_context field is resolved in VCF 9.0.1.0.

To remediate this in existing environments, you must manually restore the missing metadata within the SDDC Manager platform database.

  1. SSH to SDDC Manager as the vcf and then root user and connect to the database: psql -h localhost -U postgres -d platform
  2. Run the following query to confirm the name_context is null (replace [cluster_id] with your actual cluster ID: SELECT id, name, name_context FROM cluster WHERE id = '[cluster_id]';
  3.  Apply the following update query to restore the metadata (replace [ClusterName] with the display name of your cluster and [cluster_id] with the ID): UPDATE cluster SET name_context = '[{"context":"STRETCH","name":"[ClusterName]"}]' WHERE id = '[cluster_id]';
  4. Return to the SDDC Manager UI and restart the failed expansion task.

Note: It is recommended to take an offline snapshot of the SDDC Manager VM before performing manual database modifications.