-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Please, answer some short questions which should help us to understand your problem / question better?
- Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.7.1
- Where do you run it - cloud or metal? Kubernetes or OpenShift? [OpenShift 4.6]
- Are you running Postgres Operator in production? [no]
- Type of issue? [Bug report]
Postgres-operator-ui can't get operator logs for teams with name 'team-ХХ'.
How to reproduce:
- Create team 'team-66'
- Create new cluster via Postgres-operator-ui
- Try get operator logs for this cluster
Result: cluster was created succefully, but you can't get logs from operator.
Postgres operator UI logs:
- namespace: namespacetwo
- dbname: db3
- team: team-66
Message: "Create cluster by local-user/['namespacetwo', 'team-66'] {'kind': 'postgresql', 'apiVersion': 'acid.zalan.do/v1', 'metadata': {'name': 'team-66-db3', 'namespace': 'namespacetwo', 'labels': {'team': 'team-66'}}, 'spec': {'teamId': 'team-66', 'postgresql': {'version': '14'}, 'numberOfInstances': 1, 'volume': {'size': '1Gi'}, 'allowedSourceRanges': None, 'resources': {'requests': {'cpu': '100m', 'memory': '100Mi'}, 'limits': {'cpu': '500m', 'memory': '500Mi'}}}}"
Arguments: ()
10.254.4.1 - - [2022-03-09 09:55:37] "POST /create-cluster HTTP/1.1" 200 109 0.025983
10.254.4.1 - - [2022-03-09 09:55:37] "GET /postgresqls/namespacetwo/team-66-db3 HTTP/1.1" 200 1282 0.018089
10.254.4.1 - - [2022-03-09 09:55:37] "GET /statefulsets/namespacetwo/team-66-db3 HTTP/1.1" 404 116 0.015854
10.254.4.1 - - [2022-03-09 09:55:38] "GET /health HTTP/1.1" 200 117 0.000862
operator_ui.main ERROR Exception on /operator/clusters/namespacetwo/team-66-db3/logs [GET]
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/operator_ui/main.py", line 196, in wrapper
return f(*args, **kwargs)
File "/operator_ui/main.py", line 916, in get_operator_get_logs_per_cluster
return proxy_operator(f'/clusters/{team}/{namespace}/{clustername}/logs/')
File "/operator_ui/main.py", line 890, in proxy_operator
response.raise_for_status()
File "/usr/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://postgres-operator.postgres-operator.svc:8080/clusters/team/namespacetwo/66-db3/logs/