AKO failing to push objects due to this error  "Enum value not found in enum type LbAlgorithm"
search cancel

AKO failing to push objects due to this error  "Enum value not found in enum type LbAlgorithm"

book

Article ID: 373612

calendar_today

Updated On:

Products

VMware Avi Load Balancer

Issue/Introduction

AKO is failing to push objects due to this error  "Enum value not found in enum type LbAlgorithm" after upgrading the TKG cluster.

 

Environment

Affected AKO Version: 1.10.2

Cause

AKO is failing in creating/updating pools with following error:

kubectl logs <AKO-POD-Name> -n vmware-system-ako

024-07-23T11:47:36.810Z        [[0m rest/rest_operation.go:304      key: admin/dev-workload-Shared-L7-0, msg: RestOp method PUT path /api/pool/

pool-68c87375-8546-45df-9476-df45be34ce86 tenant admin Obj {"cloud_config_cksum":"2567219764","cloud_ref":"/api/cloud?name=dev","created_by":"ako-dev-cluster","health_monitor_refs":["/api/healthmonitor?name=HM_HTTP_DEV/mga-7512-prep/preparacion/actuator/health"],"lb_algorithm":"","markers":[{"key":"clustername","values":["dev-workload-cluster-dev-workload-cluster"]},{"key":"Namespace","values":["mga-7512-prep"]},{"key":"Host","values":["mga-7512.prep.dev.laba21.test.com"]},{"key":"ServiceName","values":["mga-back-preparacion"]},{"key":"Path","values":["/preparacion"]},{"key":"IngressName","values":["mga-back-preparacion"]}],"name":"dev-workload-cluster-dev-workload-cluster--mga-7512-prep-mga-7512.prep.dev.laba21.mtest.com.preparacion-mga-back-preparacion","placement_networks":[{"network_ref":"/api/network/dvportgroup-2552-cloud-0800ae83-8a84-4c04-99fa-161a1f48b458","subnet":{"ip_addr":{"addr":"10.1.1.0","type":"V4"},"mask":24}}],"service_metadata":"{\"namespace_ingress_name\":null,\"ingress_name\":\"mga-back-preparacion\",\"namespace\":\"mga-7512-prep\",\"hostnames\":[\"mga-7512.prep.dev.laba21.test.com\"],\"namespace_svc_name\":null,\"crd_status\":{\"type\":\"HTTPRule\",\"value\":\"mga-7512-prep/hm-http-dev-mga-7512-prep-preparacion-actuator-health//preparacion\",\"status\":\"ACTIVE\"},\"pool_ratio\":100,\"passthrough_parent_ref\":\"\",\"passthrough_child_ref\":\"\",\"gateway\":\"\",\"insecureedgetermallow\":false,\"is_mci_ingress\":false}","sni_enabled":false,"tenant_ref":"/api/tenant/?name=admin","vrf_ref":"/api/vrfcontext?name=global"} returned err {} with response null

If we look at rest request, lb_algorithm is set to empty value. In the  avi controller Events will show this error:  "Enum value not found in enum type LbAlgorithm"

 

Resolution

It would be better to upgrade the AKO to 1.10.3 and above versions to fix this issue. However if you are using TKGM then AKO needs to be upgraded via TKGM package only. 

Please apply the workaround if upgrade cannot be done.

Workaround:

1.Workaround is to create HTTPrule for every Host/Path combination.

loadBalancerPolicy:
      algorithm: LB_ALGORITHM_CONSISTENT_HASH

2.Then Set the deleconfig flag to true in the AKO config map.This will remove all the VS/pool config from the controller which was created by AKO.

3.Apply all the hostrules you created.

4.Set the deleteconfig flag back to false in AKO config map.This should sync back all the Related VS/Pool configuration.

Fix version: AKO 1.10.3 and above.

Note: Please involve support team in order to apply the workaround.