Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG REPORT] When creating a Load Balancer the backends of the backend set (TCP 80) are not created automatically. #423

Open
GBT55 opened this issue Apr 14, 2023 · 2 comments

Comments

@GBT55
Copy link

GBT55 commented Apr 14, 2023

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

CCM Version: v1.25.0

Environment:

  • Kubernetes version (use kubectl version): v1.25.9
  • OS (e.g. from /etc/os-release): Ubuntu 22.04.2 LTS
  • Kernel (e.g. uname -a): Linux kow-m02 5.15.0-1032-oracle Update to latest SHA of bmcs-go-sdk #38-Ubuntu SMP Thu Mar 23 19:30:10 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
  • Others:

What happened?

When creating a Load Balancer with the Nginx example from https://github.com/oracle/oci-cloud-controller-manager/blob/master/docs/tutorial.md the backends of the backend set (TCP 80) aren't automatically created.

What you expected to happen?

That the the backends of the backend set (TCP 80) would be created automatically.

How to reproduce it (as minimally and precisely as possible)?

Use the example from https://github.com/oracle/oci-cloud-controller-manager/blob/master/docs/tutorial.md and append the following annotations to the LB service:

annotations:
    oci.oraclecloud.com/load-balancer-type: "lb"
    service.beta.kubernetes.io/oci-load-balancer-shape: "flexible"
    service.beta.kubernetes.io/oci-load-balancer-shape-flex-min: "10"
    service.beta.kubernetes.io/oci-load-balancer-shape-flex-max: "10"
    service.beta.kubernetes.io/oci-load-balancer-subnet1: "ocid1.aaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

Then this LB will be created, with a backend configured TCP 80, but empty of backends inside it
image

Anything else we need to know?

If I try to curl the web, this happens:

guille@raspberrypi: $ curl http://<LoadBalancer_IP>:80/
curl: (56) Recv failure: Connection reset by peer

But, If I create the backends myself (via the web console) then I'm able to connect to the webpage e.g.

guille@raspberrypi: $ curl http://<LoadBalancer_IP>:80/
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
@GBT55 GBT55 changed the title [BUG REPORT] When creating a Load Balancer backend sets are not created automatically. [BUG REPORT] When creating a Load Balancer the backends of the backend set (TCP 80) are not created automatically. Apr 14, 2023
@AkarshES
Copy link
Contributor

Please attach the logs from the cloud-controller-manager pod running in your cluster

@GBT55
Copy link
Author

GBT55 commented Apr 15, 2023

oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager E0415 15:03:05.654951       1 node_controller.go:258] Error getting instance metadata for node addresses: error fetching node by provider ID: MapProviderIDToInstanceID: provider ID is empty, and error by node name: Failed to map providerID to instanceID
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager I0415 15:03:07.331094       1 controller.go:417] Ensuring load balancer for service samples/nginx-svc
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager I0415 15:03:07.331612       1 controller.go:947] Adding finalizer to service samples/nginx-svc
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager I0415 15:03:07.332619       1 event.go:294] "Event occurred" object="samples/nginx-svc" fieldPath="" kind="Service" apiVersion="v1" type="Normal" reason="EnsuringLoadBalancer" message="Ensuring load balancer"
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager 2023-04-15T15:03:07.356Z        INFO    oci/load_balancer.go:411        Ensuring load balancer  {"component": "cloud-controller-manager", "loadBalancerName": "2fec19f4-b4a8-4b2a-bdf5-6269f3a5ce34", "serviceName": "nginx-svc", "loadBalancerType": "lb", "nodes": 0}
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager I0415 15:03:07.356362       1 event.go:294] "Event occurred" object="samples/nginx-svc" fieldPath="" kind="Service" apiVersion="v1" type="Warning" reason="UnAvailableLoadBalancer" message="There are no available nodes for LoadBalancer"
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager 2023-04-15T15:03:07.671Z        INFO    oci/load_balancer_security_lists.go:99  Security list management mode: "All". Managing all security lists. {"component": "cloud-controller-manager"}
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager 2023-04-15T15:03:07.671Z        INFO    oci/load_balancer.go:266        Attempting to create a new load balancer        {"component": "cloud-controller-manager", "loadBalancerName": "2fec19f4-b4a8-4b2a-bdf5-6269f3a5ce34", "loadBalancerType": "lb"}
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager 2023-04-15T15:03:08.352Z        INFO    oci/load_balancer.go:323        Await workrequest for create loadbalancer       {"component": "cloud-controller-manager", "loadBalancerName": "2fec19f4-b4a8-4b2a-bdf5-6269f3a5ce34", "loadBalancerType": "lb", "workRequestID": "ocid1.loadbalancerworkrequest.oc1.eu-madrid-1.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager 2023-04-15T15:03:28.401Z        INFO    oci/load_balancer.go:328        Workrequest for create loadbalancer succeeded   {"component": "cloud-controller-manager", "loadBalancerName": "2fec19f4-b4a8-4b2a-bdf5-6269f3a5ce34", "loadBalancerType": "lb", "workRequestID": "ocid1.loadbalancerworkrequest.oc1.eu-madrid-1.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager 2023-04-15T15:03:28.474Z        INFO    oci/load_balancer.go:339        Load balancer created   {"component": "cloud-controller-manager", "loadBalancerName": "2fec19f4-b4a8-4b2a-bdf5-6269f3a5ce34", "loadBalancerType": "lb", "loadBalancerID": "ocid1.loadbalancer.oc1.eu-madrid-1.aaaaaaaaxbv3rt3nieajijs4i7724aw6nafama76ifz2jwkshdfd2mcvocjq"}
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager 2023-04-15T15:03:28.596Z        INFO    oci/load_balancer.go:522        Successfully provisioned loadbalancer   {"component": "cloud-controller-manager", "loadBalancerName": "2fec19f4-b4a8-4b2a-bdf5-6269f3a5ce34", "serviceName": "nginx-svc", "loadBalancerID": "ocid1.loadbalancer.oc1.eu-madrid-1.aaaaaaaaxbv3rt3nieajijs4i7724aw6nafama76ifz2jwkshdfd2mcvocjq", "loadBalancerType": "lb"}
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager I0415 15:03:28.596721       1 controller.go:988] Patching status for service samples/nginx-svc
oci-cloud-controller-manager-6tz77 oci-cloud-controller-manager I0415 15:03:28.597694       1 event.go:294] "Event occurred" object="samples/nginx-svc" fieldPath="" kind="Service" apiVersion="v1" type="Normal" reason="EnsuredLoadBalancer" message="Ensured load balancer"
- oci-cloud-controller-manager-6tz77 › oci-cloud-controller-manager
- oci-cloud-controller-manager-kktmv › oci-cloud-controller-manager
failed to tail: unexpected EOF, will retry
failed to tail: unexpected EOF, will retry
+ oci-cloud-controller-manager-kktmv › oci-cloud-controller-manager
+ oci-cloud-controller-manager-6tz77 › oci-cloud-controller-manager
- oci-cloud-controller-manager-6tz77 › oci-cloud-controller-manager
failed to tail: unexpected EOF, will retry
- oci-cloud-controller-manager-kktmv › oci-cloud-controller-manager
+ oci-cloud-controller-manager-6tz77 › oci-cloud-controller-manager
failed to tail: unexpected EOF, will retry
+ oci-cloud-controller-manager-kktmv › oci-cloud-controller-manager

There you go @AkarshES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants