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

GCP Private Endpoint in Tokyo region keeps getting deleted #1975

Closed
dzoeteman opened this issue Dec 9, 2024 · 2 comments
Closed

GCP Private Endpoint in Tokyo region keeps getting deleted #1975

dzoeteman opened this issue Dec 9, 2024 · 2 comments

Comments

@dzoeteman
Copy link

What did you do to encounter the bug?
Steps to reproduce the behavior:

  1. Create Atlas project
  2. Add private endpoint to AtlasProject object in Tokyo GCP region
kind: AtlasProject
spec:
  privateEndpoints:
    - provider: GCP
      region: asia-northeast1
  1. Open up Atlas UI, notice private endpoint gets created, and deleted soon after, repeating
  2. Debug-level logs also show Number of Private Endpoints to delete: 1 and Removed Private Endpoint Service from Atlas as it's not specified in current AtlasProject

What did you expect?
Private endpoint should be kept running and not deleted.

What happened instead?
Private endpoint gets deleted and recreated, repeating.

Operator Information

  • Operator Version: v1.7.2
    This is an old version, but looking at the latest code, there doesn't seem to be any difference that would resolve/impact this bug.

Kubernetes Cluster Information

  • Distribution: GKE
  • Version: 1.30.5

Additional context
Looking at code, the problem seems to originate in the TransformRegionToID() function, and the fact that the region in Atlas contains the word pacific, while the GCP region does not. Comparison of function inputs/outputs:

GCP region: asia-northeast1 -> aaaehinorsstt
Atlas region: NORTHEASTERN_ASIA_PACIFIC -> aaaaccefhiiinoprsstt

While with a region like us-central1, there's no difference, since there's no extra word in the Atlas region (CENTRAL_US). Output for both cases then is acelnrstu.

Based on this finding, I imagine the same problem would occur with EASTERN_ASIA_PACIFIC and SOUTHEASTERN_ASIA_PACIFIC regions (ref).

There does appear work to be done on a separate controller/CRD for Private Endpoints (PR), which would be welcome, but in the meantime, this bug exists and has existed since this old version v1.7.2 at least.

@josvazg
Copy link
Collaborator

josvazg commented Dec 10, 2024

Thanks for bringing this up to our attention!
We will look into the issue.

@josvazg
Copy link
Collaborator

josvazg commented Dec 17, 2024

After careful consideration we have decided not to fix this bug. This problem disappears completely on a new version we are releasing soon.

The reason this will no longer be a problem going forward in the new version is that the Private Endpoints are now defined in their own separated CRD and they always use the region id naming from Atlas. There is no need for complex and brittle comparisons any more.

We understand you reported this on a very old version of the Operator, 1.7.2. We don’t back-port fixes to past versions of the operator, so we recommend migrating to new version of the Operator coming soon, and move private endpoint definitions to their own CRDs.

If you are having trouble migrating to the latest version we suggest you to check out the documentation here.

For any assistance needed in upgrading the operator, please contact MongoDB Support.

We will now close this issues as "won't fix", as the broken code is being deprecated.

@josvazg josvazg closed this as completed Dec 17, 2024
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