Updating incorrect project and cloud zone allocation data in Aria Automation
search cancel

Updating incorrect project and cloud zone allocation data in Aria Automation

book

Article ID: 430939

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

  • In  Aria Automation, you may observe that the allocated resource data (CPU, Memory, Storage, or Instance counts) for a Project or Cloud Zone is inaccurate.

  • This typically occurs in the UI when managed VMs or disks are missing proper placement links in the underlying database, leading to incorrect resource accounting.

Environment

Aria Automation 8.18.x

Cause

This issue is caused by missing or incorrect groupResourcePlacementLink attributes within the compute_state and disk_state records. When these links are broken, the system fails to include those resources in the total allocation for the project or cloud zone.

Resolution

To determine if the environment is impacted by this issue, follow the diagnostic steps below. If the SQL queries in Step 3 or Step 4 return any output, please open a support case with Broadcom Support  to obtain a repair script.

  1. Log in via SSH to the lead (master) node of your  Aria Automation appliance.

  2. Access the PostgreSQL session for the provisioning database:

    vracli dev psql provisioning-db
  3.  Run the following query to find compute_state records with incorrect or missing placement links:.
    SELECT cs.name, cs.custom_properties->>'__relocation_origin', grp.document_self_link as new_placement_link, cs.custom_properties->>'__groupResourcePlacementLink' as existing_placement_link
    FROM compute_state cs
    LEFT OUTER JOIN placement_zone_state ps
    ON (cs.region_id = ps.region_id AND ps.assigned_compute_links ? (cs.custom_properties->>'__placementLink') AND ps.endpoint_links ? cs.endpoint_link)
    LEFT OUTER JOIN group_resource_placement_state grp ON (ps.document_self_link = grp.placement_zone_link AND cs.project_auth_link = grp.project_link)
    WHERE cs.type = 'VM_GUEST'
    AND cs.lifecycle_state != 'RETIRED'
    AND cs.document_update_action IN ('POST','PATCH','PUT')
    AND cs.custom_properties->>'__composition_context_id' IS NOT NULL
    AND (cs.document_expiration_time_micros = 0 OR cs.document_expiration_time_micros > (EXTRACT(EPOCH FROM clock_timestamp()) * 1000000)::bigint)
    AND (cs.custom_properties->>'__groupResourcePlacementLink' IS NULL
      OR cs.custom_properties->>'__groupResourcePlacementLink' <> grp.document_self_link)
    AND grp.document_self_link IS NOT NULL
    ORDER BY cs.name;
  4. Run the following query to find disk_state records with incorrect or missing placement links:
    SELECT cs.name, ds.name, cs.document_self_link, ds.document_self_link, grp.document_self_link as new_placement_link, ds.custom_properties->>'__groupResourcePlacementLink' as current_placement_link
    FROM (SELECT document_self_link, name, region_id, document_expiration_time_micros,
           document_update_action, custom_properties->>'__composition_context_id' as composition_context_id,
               custom_properties->>'__placementLink' as placement_link, project_auth_link, disk_link
    FROM compute_state,
    LATERAL jsonb_array_elements_text(disk_links) AS t(disk_link)
    WHERE document_expiration_time_micros = 0
      AND document_update_action <>'DELETE'
      AND custom_properties->>'__composition_context_id' IS NOT NULL
    ORDER BY name) AS cs
    JOIN disk_state ds ON (cs.disk_link = ds.document_self_link AND cs.region_id = ds.region_id)
    LEFT OUTER JOIN placement_zone_state ps
    ON (ds.region_id = ps.region_id AND ps.assigned_compute_links ? (cs.placement_link) AND ps.endpoint_links ? ds.endpoint_link)
    LEFT OUTER JOIN group_resource_placement_state grp ON (ps.document_self_link = grp.placement_zone_link AND cs.project_auth_link = grp.project_link)
    WHERE ds.status != 'DETACHED'
    AND ds.lifecycle_state != 'RETIRED'
    AND (ds.document_expiration_time_micros = 0 OR ds.document_expiration_time_micros >= (EXTRACT(EPOCH FROM clock_timestamp()) * 1000000)::bigint)
    AND ds.document_update_action IN ('POST','PATCH','PUT')
    AND LOWER(ds.custom_properties->>'__isStorageReserved') = 'true'
    AND ds.type ='HDD'
    AND (ds.custom_properties->>'__groupResourcePlacementLink'<> grp.document_self_link OR ds.custom_properties->>'__groupResourcePlacementLink' IS NULL)
    AND grp.document_self_link IS NOT NULL
    ORDER BY cs.name, ds.name;
  5. If results are returned, export the output and attach to the Support Request.

Additional Information

This issue is currently under review with Broadcom Engineering for a permanent resolution in a future release.