Add Disk get fails when snapshotLimit is used as Custom property in the Project.
search cancel

Add Disk get fails when snapshotLimit is used as Custom property in the Project.

book

Article ID: 374685

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Add Disk day 2 action for the VM getting fail with ERROR: Internal Server Error when snapshotLimit is used as Custom property in the Project and assign the value  as 1.0

ERROR tango-blueprint [host='tango-blueprint-service-app-xxxxxx' thread='http-nio-8080-exec-47' user='catalog-8xxxxx(xxxx)' org='1beaa0b6-xxxxxxxxxxxx' blueprint='72f1f3ab-xxxx--xxxxxx' project='07abb1da-xxxxxxxxx' deployment='596bcac6-xxxxxxxxxxx' trace='505157c7-xxxxxxx'] com.vmware.tango.blueprint.exception.ControllerExceptionHandler - Runtime exception: class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap') [Error Reference ID: 1642cf3c-xxxxxxx] ClassCastException: class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap')

Environment

VMware Aria Automation 8.xx

Cause

snapshotLimit is a schema property of resource type Cloud.vSphere.Machine, the type is number, but snapshotLimit is added as a string of value 1.0 in project's custom properties. When customer provisions the above blueprint, blueprint service calls provisioning-service to allocate or create resource, provisioning-service will add snapshotLimit as a custom property with string value 1.0 and return to blueprint service. Then blueprint forwards this value to deployment service, and deployment service stores this string value in the DB. Then when customer performs day2 action on this vsphere machine, deployment service sends this string value to blueprint and blueprint finds out snapshotLimit is a schema property and its type is number, hence failure.

Resolution

  1. Take a Valid Backup or snapshot of Aria Automation Nodes

  2. Login to Aria Automation Appliance with root. 

  3. Login Provisioning-db and run the query:
     
    vracli dev psql provisioning-db
    UPDATE compute_state SET custom_properties = jsonb_set(custom_properties, '{snapshotLimit}', '"1"'::jsonb, true) WHERE custom_properties->>'snapshotLimit' = '1.0';
  4. Wait for 24 hours and  check the catalog-db with below query :

    vracli dev psql catalog-db
    select count(resource_id) from dep_resource_data where properties @> '{"snapshotLimit": "1.0"}';

  5. If result is zero, then catalog-db is clean.