Skip to content

pgbouncer config update fails #315

Description

@mxsrc

We get this error in the controller logs when updating a pgbouncer config map:

{
  "timestamp": "2026-04-08T13:28:54+0000",
  "level": "ERROR",
  "logger": "simplyblock.vela.api.organization.project.branch",
  "message": "PgBouncer ConfigMap vela-01knpmb8zwbxbah7cntfn7c8k4/vela-autoscaler-vm-pgbouncer not found while applying updates",
  "exc_info": "Traceback (most recent call last):
  File \"/usr/local/lib/python3.13/site-packages/simplyblock/vela/api/organization/project/branch/__init__.py\", line 2006, in _update_pgbouncer_config_map
    config_map = await core_v1.read_namespaced_config_map(name=config_map_name, namespace=namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.13/site-packages/simplyblock/vela/deployment/kubernetes/_util.py\", line 23, in call_api
    return await super().call_api(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.13/site-packages/kubernetes_asyncio/client/api_client.py\", line 193, in __call_api
    raise e
  File \"/usr/local/lib/python3.13/site-packages/kubernetes_asyncio/client/api_client.py\", line 186, in __call_api
    response_data = await self.request(
                    ^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
        _request_timeout=_request_timeout)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.13/site-packages/kubernetes_asyncio/client/rest.py\", line 213, in GET
    return (await self.request(\"GET\", url,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
                               query_params=query_params))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.13/site-packages/kubernetes_asyncio/client/rest.py\", line 207, in request
    raise ApiException(http_resp=r)
kubernetes_asyncio.client.exceptions.ApiException: (404)
Reason: Not Found
HTTP response headers: <CIMultiDictProxy('Audit-Id': '5bd5962e-8f9a-4425-b4b0-971045892345', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '794a5b08-3374-47c0-8cd3-694effe5bc35', 'X-Kubernetes-Pf-Prioritylevel-Uid': '90c3ac8c-c739-482a-b831-e609716265e3', 'Date': 'Wed, 08 Apr 2026 13:28:54 GMT', 'Content-Length': '236')>
HTTP response body: {\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"configmaps \\\"vela-autoscaler-vm-pgbouncer\\\" not found\",\"reason\":\"NotFound\",\"details\":{\"name\":\"vela-autoscaler-vm-pgbouncer\",\"kind\":\"configmaps\"},\"code\":404}

"
}
{
  "timestamp": "2026-04-08T13:28:54+0000",
  "level": "INFO",
  "logger": "uvicorn.access",
  "message": "10.244.3.78:47610 - \"PATCH /organizations/01KHEM2PTNSRATSF37K6M29M04/projects/01KHEM6QVYX2JZB93C51N8ZJ40/branches/01KNPMB8ZWBXBAH7CNTFN7C8K4/pgbouncer-config HTTP/1.1\" 500"
}

The config map is in fact not present:

$ kubectl -n vela-01knpmb8zwbxbah7cntfn7c8k4 get configmap vela-autoscaler-vm-pgbouncer
Error from server (NotFound): configmaps "vela-autoscaler-vm-pgbouncer" not found

Metadata

Metadata

Assignees

Labels

vela-controllerIssue is related to vela-controller

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions