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

GlobalIP not assigned in pod "init" phase #1342

Closed
davtex opened this issue Aug 9, 2023 · 2 comments · Fixed by submariner-io/submariner#2646
Closed

GlobalIP not assigned in pod "init" phase #1342

davtex opened this issue Aug 9, 2023 · 2 comments · Fixed by submariner-io/submariner#2646
Assignees
Labels
bug Something isn't working

Comments

@davtex
Copy link

davtex commented Aug 9, 2023

What happened:
I am experimenting with Submariner with Globalnet and Apache Cassandra -> NoSQL database that is not exactly cloud-friendly and relies heavily on P2P connections. For it to work correctly in multi-cluster environment, a parameter "broadcast_address" needs to be configured before startup -> Cassandra uses this value to "announce" on which IP it is available to the rest of the cluster. In non-Submariner setups this would be some sort of node/loadbalancer publicIP, in case of Submariner+Globalnet this would be GlobalIP. So theoretically I just need to configure GlobalIP in Cassandra config file before pod is started and I should be done.

Obvious choice for me here is to use initContainer to query endpointslices from kube-apiserver and add returned GlobalIP to Cassandra config. But here comes the issue -> even though pod already has PodIP assigned, Submariner waits for pod to be in "Running" phase to assign GlobalIP, meaning I am unable to query it since initContainers run during pod's "Init" phase -> before Running phase. FYI I am using "publishNotReadyAddresses: true" and service is headless -> lighthouse complains that GlobalIP has not yet been assigned.

What you expected to happen:
I expect GlobalIP to be assigned as soon as PodIP is available so it can be used for various tasks in initContainers.

How to reproduce it (as minimally and precisely as possible):
Create simple deployment with headless service and add initContainer -> GlobalIP won't be assigned until pod enters Running phase

Environment:

  • OCP: 4.13.0-0.okd-2023-05-22-052007
  • Submariner 0.15.2
  • Cloud provider or hardware configuration: 2x vSphere clusters on-premise
@davtex davtex added the bug Something isn't working label Aug 9, 2023
@sridhargaddam sridhargaddam transferred this issue from submariner-io/submariner Aug 9, 2023
@sridhargaddam
Copy link
Member

CC: @tpantelis @vthapar

@tpantelis
Copy link
Contributor

tpantelis commented Aug 9, 2023

I think that's this b/c of this code and TODO in globalnet. We should honor the publishNotReadyAddresses annotation.

@tpantelis tpantelis self-assigned this Aug 10, 2023
@tpantelis tpantelis moved this to In Progress in Submariner 0.16 Aug 10, 2023
tpantelis added a commit to tpantelis/submariner that referenced this issue Aug 10, 2023
Lighthouse honors this flag when publiishing endpoint addresses so
Globalnet needs to as well when allocating a global IP for ingress.

Fixes submariner-io/lighthouse#1342

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
@tpantelis tpantelis moved this from In Progress to In Review in Submariner 0.16 Aug 10, 2023
tpantelis added a commit to tpantelis/submariner that referenced this issue Aug 10, 2023
Lighthouse honors this flag when publishing endpoint addresses so
Globalnet needs to as well when allocating a global IP for ingress.

Fixes submariner-io/lighthouse#1342

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
skitt pushed a commit to submariner-io/submariner that referenced this issue Aug 20, 2023
Lighthouse honors this flag when publishing endpoint addresses so
Globalnet needs to as well when allocating a global IP for ingress.

Fixes submariner-io/lighthouse#1342

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
@github-project-automation github-project-automation bot moved this from In Review to Done in Submariner 0.16 Aug 20, 2023
novad03 added a commit to novad03/k8s-submariner that referenced this issue Nov 25, 2023
Lighthouse honors this flag when publishing endpoint addresses so
Globalnet needs to as well when allocating a global IP for ingress.

Fixes submariner-io/lighthouse#1342

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants