Skip to content

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

Merged
hemanthnakkina merged 1 commit into
canonical:mainfrom
hemanthnakkina:fix/cacert-file-path
Jun 25, 2026
Merged

fix: use file path instead of PEM bytes for novaclient cacert#199
hemanthnakkina merged 1 commit into
canonical:mainfrom
hemanthnakkina:fix/cacert-file-path

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

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>
@hemanthnakkina
hemanthnakkina merged commit 759615f into canonical:main Jun 25, 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