Skip to content

fix: use file path instead of PEM bytes for novaclient cacert#201

Merged
gboutry merged 1 commit into
canonical:stable/2024.1from
hemanthnakkina:fix/cacert-file-path-stable/2024.1
Jun 29, 2026
Merged

fix: use file path instead of PEM bytes for novaclient cacert#201
gboutry merged 1 commit into
canonical:stable/2024.1from
hemanthnakkina:fix/cacert-file-path-stable/2024.1

Conversation

@hemanthnakkina

Copy link
Copy Markdown
Collaborator

The hypervisor disable command (invoked during sunbeam cluster remove) passes the base64-decoded CA bundle bytes directly as cacert to novaclient.Client. However, keystoneauth1/requests expects cacert to be a filesystem path, not certificate content. This causes OSError: Could not find a suitable TLS CA certificate bundle, invalid path on TLS-enabled deployments.

Reuse the existing on-disk CA bundle written by _configure_cabundle_tls to $SNAP_COMMON/etc/ssl/certs/receive-ca-bundle.pem and pass that path instead.

Fixes https://bugs.launchpad.net/snap-openstack/+bug/2158018

Assisted-by: z-ai/glm-5.2

(cherry picked from commit 1616cd0)

The `hypervisor disable` command (invoked during `sunbeam cluster remove`)
passes the base64-decoded CA bundle bytes directly as `cacert` to
`novaclient.Client`. However, `keystoneauth1`/`requests` expects `cacert`
to be a filesystem path, not certificate content. This causes
`OSError: Could not find a suitable TLS CA certificate bundle, invalid path`
on TLS-enabled deployments.

Reuse the existing on-disk CA bundle written by `_configure_cabundle_tls`
to `$SNAP_COMMON/etc/ssl/certs/receive-ca-bundle.pem` and pass that path
instead.

Fixes https://bugs.launchpad.net/snap-openstack/+bug/2158018

Assisted-by: z-ai/glm-5.2
Signed-off-by: Hemanth Nakkina <hemanth.nakkina@canonical.com>
(cherry picked from commit 1616cd0)
@hemanthnakkina
hemanthnakkina requested a review from gboutry June 25, 2026 11:51
@gboutry
gboutry merged commit d70ee1c into canonical:stable/2024.1 Jun 29, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants