Cloud template with two negating constraint tags may fail with 'Duplicate key non-existing-tag' exception
search cancel

Cloud template with two negating constraint tags may fail with 'Duplicate key non-existing-tag' exception

book

Article ID: 318349

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
  • The failure occurs when there is more than one negation(not !) tag constraint existing on a Cloud Template & these tags are not specified anywhere else in the configuration. For example the non matching tags below exist on a cloud template object

Constraints: tag:
"!Backup:disabled:hard"
"!AntiVirus:enabled:hard"

  • The Provisioning service log /services-logs/prelude/provisioning-service-app/file-logs/provisioning-service-app.log contains an error similar to:

2022-09-15T03:01:34.580Z WARN provisioning [host='provisioning-service-app-xxxxxxxxxx-xxxxx' thread='xn-index-queries-xx' user='tango-blueprint-I7R2alDWWyLezGb3(fritz)' org='<Org_ID>' trace='<UUID_1>' parent='<UUID_2>' span='<UUID_3>'] c.v.a.r.c.ComputeReservationTaskService.log:454 - [8282/provisioning/requests/compute-reservation-tasks/<Task_ID>] Unable to reserve capacity. Error: java.lang.IllegalStateException: Duplicate key non-existing-tag (attempted merging values false and false)
                at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:133)
                at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180)

            

 


Environment

VMware vRealize Automation 8.x

Resolution

The issue is resolved in the vRealize Automation 8.10.1 release

Workaround:

To workaround the issue you have two options available:

1. The respective tags to be used in cloud templates are created prior to provisioning via the tags management page Infrastructure > Tags. This will prevent the issue from occurring.

or

2. The respective tags to be used in cloud templates are added as capability tags to the respective constructs (compute, zone, account) prior to provisioning. This also will prevent the problem from occurring.