kubernetes-sigs / cloud-provider-huaweicloud

HUAWEI CLOUD Controller Manager is an external cloud controller manager for running kubernetes in a HUAWEI CLOUD cluster.
Apache License 2.0
40 stars 26 forks source link

Issue when creating a dedicated ELB with auto create EIP #208

Closed cloudomate closed 1 year ago

cloudomate commented 1 year ago

What happened: Trying to create a ELB on a partner cloud by using Huawei Cloud K8s CCM, i choose dedicated elb and auto create EIP x What you expected to happen: ELB should be created with EIP attached

How to reproduce it (as minimally and precisely as possible): Create ELB using CCM and provide following metadata: annotations: kubernetes.io/elb.class: dedicated kubernetes.io/elb.availability-zones: ae-ad-1a kubernetes.io/elb.l4-flavor-id: a53df111-cc06-4c49-a417-2aac536f8eb3 kubernetes.io/elb.lb-algorithm: ROUND_ROBIN kubernetes.io/elb.keep-eip: "false" kubernetes.io/elb.eip-auto-create-option: >- {"ip_type": "5_bgp", "bandwidth_size": 5, "share_type": "PER"}

Anything else we need to know?: If i don't provide this option, ELB gets created without EIP attached. I have also modified the {"bandwidth_name":"some_name","ip_type": "5_bgp", "bandwidth_size": 5, "share_type": "PER"} and {"name":"some_name","ip_type": "5_bgp", "bandwidth_size": 5, "share_type": "PER"}

Environment:

Logs from CCM: E0313 12:37:42.110722 1 dedicated_elb.go:47] Error in wrapper handler(), args: []interface {}{"Loadbalancer", (**model.LoadBalancer)(0xc000514c60)}, error: {"status_code":400,"request_id":"1402655ec2c66d91dd28901d69ec3d20","error_code":"ELB.8902","error_message":"Unable to find 'name' required attribute in bandwidth when id is null."} I0313 12:37:42.110748 1 controller.go:808] Finished syncing service "take11/loadbalancer-service-demo" (4.515507678s) E0313 12:37:42.110762 1 controller.go:289] error processing service take11/loadbalancer-service-demo (will retry): failed to ensure load balancer: {"status_code":400,"request_id":"1402655ec2c66d91dd28901d69ec3d20","error_code":"ELB.8902","error_message":"Unable to find 'name' required attribute in bandwidth when id is null."} I0313 12:37:42.110803 1 event.go:294] "Event occurred" object="take11/loadbalancer-service-demo" fieldPath="" kind="Service" apiVersion="v1" type="Warning" reason="SyncLoadBalancerFailed" message=< Error syncing load balancer: failed to ensure load balancer: {"status_code":400,"request_id":"1402655ec2c66d91dd28901d69ec3d20","error_code":"ELB.8902","error_message":"Unable to find 'name' required attribute in bandwidth when id is null."}

cloudomate commented 1 year ago

cc @chengxiangdong

chengxiangdong commented 1 year ago

/triage accepted