Error "Agent with ID already exists" when registering Usage Meter in VCF Business console
search cancel

Error "Agent with ID already exists" when registering Usage Meter in VCF Business console

book

Article ID: 443612

calendar_today

Updated On:

Products

VMware Usage Meter

Issue/Introduction

  • Attempting to register Usage Meter to a site on VCF Business console Register the VCF Usage Meter Appliance in the VCF Business Services Console fails with error
    "Failed to register this Usage Meter : Agent with ID xxxxxxxx already exists".
  • The usage meter instance is not listed in VCF Business console : Site view > Usage Management > Usage meters {despite enabling the toggle for "Include unregistered Usage Meters"} 

Environment

  • VCF Usage Meter 9.x

Cause

  • The UM with the reported UUID is / previously was registered to another Site. 

Resolution

  • To resolve the issue, follow either of the below options:
    1. Move the UM instance across tenants:
      1. Move the UM across tenants using UI:
      2. Move the UM to the new tenant using API:
        • If the UM has no access token in the source tenant (unregistration is not mandatory) we can move the UM to a new tenant using the API. In the context of the 'DestinationTenant' tenant call 
          curl -X PATCH https://eapi.broadcom.com/vcf/ums/api/v2/<DestinationTenantID>/agents -H "Authorization: Bearer $TOKEN" -d '[{"agentId":"<agentId1>"},{"agentId":"<agentId2>",...,{"agentId":"<agentId10>"}}]'
        • In our case only one agent instance would be passed. 
        • Note:
          • We can call this API with up to 10 agents at a time. If the UMs are not unregistered in the response will contain new access tokens for the new tenant.
          • Else if we move unregistered UMs then they will remain in that same state in the new tenant. If we wish to use them we would have to re-register them in the new tenant and get access tokens to activate them.
        • Sample output:
          [
            {
              "agentId": "<agentID1>",
              "accessToken": <accessToken_for_agent1>"
            },{
              "agentId": "<agentID2>",
              "accessToken": "<accessToken_for_agent2>"
            },
            ...
            {
              "agentId": "<agentID10>",
              "accessToken": "<accessToken_for_agent10>"
            }
          ]
    2. Deploy and register a new UM instance to the new tenant: