[AMKO] Error “error in parsing the web api error to avi error: Rest request error” Observed After Upgrading to Avi Controller 30.2.x
search cancel

[AMKO] Error “error in parsing the web api error to avi error: Rest request error” Observed After Upgrading to Avi Controller 30.2.x

book

Article ID: 416595

calendar_today

Updated On:

Products

VMware Avi Load Balancer

Issue/Introduction

  • After upgrading the Avi Controller to version 30.2.x  users may observe intermittent errors in AMKO logs when creating or updating GSLBService objects.

  • No new GSLB Services was getting created.
  • This issue is observed when AMKO (running on OpenShift or Kubernetes) attempts to communicate with the Avi Controller via the REST API.

 

  • AMKO logs contain recurring messages similar to:

     
    ERROR gslbutils/gslbutils.go:737 error in parsing the web api error to avi error: Rest request error, returning to caller, will retry <number>
  • AMKO POD may also show:

    2025-10-21T13:34:20.473Z        ^[[34mINFO^[[0m ingestion/fullsync.go:472       key: {admin ###}, msg: can't get gs name from hm, err : hmName: ###, hmDescription: , msg: hm is malformed, error in parsing gs name, unexpected format
     

 

Environment

 

  • Version(s): 22.1.x ,30.2.x,31.1.x

  • Component: AMKO (Avi Multicluster Kubernetes Operator)

  • Platform: OpenShift / Kubernetes

 

Cause

The issue occurs due to a defect in the alb-sdk library used by AMKO to handle Avi REST API calls.

When AMKO constructs API requests, it checks whether the URL ends with "login". If it does, AMKO assumes the request is for authentication and skips adding the authentication header (sessionid cookie).
However, the check incorrectly triggers for any URL that ends with “login”, even if it is not the Avi /login endpoint — for example, when a Health Monitor object name ends with “-login”.

This results in:

  • Missing authentication headers for certain REST calls.

  • REST request parsing errors on the AMKO side.

  • Retries and failed reconciliations.

Example problematic config:

 
healthMonitorRefs:
        - amko-test-login

Resolution

Workaround

Rename any Health Monitor or object reference that ends with "login".
For example:

 
healthMonitorRefs:
     - amko-test-login

should be renamed to:

 
healthMonitorRefs:
    - amko-test-http

After renaming, AMKO should be able to communicate with the Controller successfully.

 

 

Permanent Fix

A code-level fix is being targeted in AMKO 2.1.1.
This fix will make the SDK check explicitly for the /login endpoint instead of any string ending with “login”.