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

UI can't list any of the clusters #2674

Open
droslean opened this issue Jun 26, 2024 · 5 comments
Open

UI can't list any of the clusters #2674

droslean opened this issue Jun 26, 2024 · 5 comments
Labels

Comments

@droslean
Copy link

droslean commented Jun 26, 2024

  • Which image of the operator are you using? e.g. ghcr.io/zalando/postgres-operator:v1.12.2
    ghcr.io/zalando/postgres-operator-ui:v1.12.2
    ghcr.io/zalando/postgres-operator:v1.12.2

  • Where do you run it - cloud or metal? Kubernetes or OpenShift? [AWS K8s | GCP ... | Bare Metal K8s]
    Kubernetes on DigitalOcean

  • Are you running Postgres Operator in production? [yes | no]
    YES

  • Type of issue? [Bug report, question, feature request, etc.]
    BUG ????

127.0.0.1 - - [2024-06-26 14:10:39] "GET /postgresqls HTTP/1.1" 200 109 0.008343
{"asctime": "2024-06-26 14:10:42,131", "levelname": "ERROR", "message": "Exception on /stored_clusters [GET]", "exc_info": "Traceback (most recent call last):
  File \"/usr/local/lib/python3.11/site-packages/flask/app.py\", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/flask/app.py\", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/flask/app.py\", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/flask/app.py\", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/app/operator_ui/main.py\", line 767, in get_stored_clusters
    read_stored_clusters(
      File \"/app/operator_ui/spiloutils.py\", line 274, in read_stored_clusters
    client('s3', endpoint_url=AWS_ENDPOINT).list_objects(
      File \"/usr/local/lib/python3.11/site-packages/botocore/client.py\", line 565, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/botocore/client.py\", line 958, in _make_api_call
    api_params = self._emit_api_params(
                     ^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/botocore/client.py\", line 1084, in _emit_api_params
    self.meta.events.emit(
      File \"/usr/local/lib/python3.11/site-packages/botocore/hooks.py\", line 412, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/botocore/hooks.py\", line 256, in emit
    return self._emit(event_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/botocore/hooks.py\", line 239, in _emit
    response = handler(**kwargs)
               ^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/botocore/handlers.py\", line 282, in validate_bucket_name
    if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'"}
127.0.0.1 - - [2024-06-26 14:10:42] "GET /stored_clusters HTTP/1.1" 500 401 0.034071

image

@FxKu
Copy link
Member

FxKu commented Jun 27, 2024

You've selected the Backups tab in UI. If you have neither configured a backup location nor set the required environment variable for UI deployment these errors are expected.

@FxKu FxKu added the question label Jun 27, 2024
@droslean
Copy link
Author

well, the clusters are completely missing. It's not the specific backups tab. The UI can't find any of the clusters that haven't been created by the UI.

@droslean
Copy link
Author

To replicate this, just create a cluster manually and you will see that the UI won't be able to find it. If you create a cluster through the UI, the cluster will be listed as normal. This is 100% a BUG in the UI.

@FxKu
Copy link
Member

FxKu commented Jul 23, 2024

Sorry, I cannot replicate this. I tested in minikube adding the operator and ui using the provided kustomizations. No matter if I create a cluster with kubectl create or via UI, both clusters are listed. What setup have you tested?

@docbobo
Copy link

docbobo commented Sep 4, 2024

I am experiencing the exact same thing here. Clusters are all defined in namespaces different from the default namespace.

UPDATE: And that was already the issue: targetNamespace needs to be *...

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

No branches or pull requests

3 participants