VCF Cluster Validation fails with NoSuchElementException in ClusterUpdateSpec
search cancel

VCF Cluster Validation fails with NoSuchElementException in ClusterUpdateSpec

book

Article ID: 443059

calendar_today

Updated On:

Products

VCF Operations

Issue/Introduction

When performing a cluster stretch validation operation in VMware Cloud Foundation (VCF) 9.x, the validation task fails during the CREATE_CLUSTER_VALIDATION or ClusterUpdateSpec phase.

The following error is observed in the SDDC Manager UI: java.util.NoSuchElementException: No value present

Reviewing the /var/log/vmware/vcf/domainmanager/domainmanager.log reveals a stack trace similar to:

ERROR [vcf_dm,id,tag] [c.v.v.d.f.h.ClustersPostHandler] Exception thrown during validation
com.vmware.evo.sddc.common.core.error.InternalServerErrorException: Invocation of task ValidateClusterUpdateSpec failed.
...
Caused by: java.util.NoSuchElementException: No value present
    at java.base/java.util.Optional.get(Optional.java:148)
    at com.vmware.vcf.common.network.validator.NetworkSpecValidator.validateUplinkProfiles(NetworkSpecValidator.java:112)

Environment

VCF 9.x

Cause

This issue occurs due to a typo in the Uplink Profile for network section within the JSON input specification.

The NetworkSpecValidator perform a strict string comparison between:

  1. The name defined in the uplinkProfiles block.
  2. The uplinkProfileName referenced in the networkProfiles block.

Resolution

To resolve this issue, ensure the naming convention is identical across all references in the JSON payload.

Reference: VMware Cloud Foundation API - ClusterUpdateSpec