Skip to content

fix(loadbalancer): pass region to openstack-port-cni-k8s charm#808

Merged
gboutry merged 1 commit into
canonical:mainfrom
hemanthnakkina:fix-port-cni-region
Jun 4, 2026
Merged

fix(loadbalancer): pass region to openstack-port-cni-k8s charm#808
gboutry merged 1 commit into
canonical:mainfrom
hemanthnakkina:fix-port-cni-region

Conversation

@hemanthnakkina
Copy link
Copy Markdown
Collaborator

openstack-port-cni-k8s has a 'region' config option used when authenticating with OpenStack. Without it the daemon defaults to RegionOne, which causes authentication failures in multi-region deployments.

Add an 'openstack-port-cni-region' Terraform variable to the deploy-cni plan and merge it into the charm's config block so that a manifest-level config override cannot accidentally unset it. Pass the value from deployment.get_region_name() in DeployAmphoraInfraStep.run(), consistent with how other charms in the deployment pick up the configured region.

Partial-Fix: https://bugs.launchpad.net/snap-openstack/+bug/2155113

Assisted-By: Claude Sonnet 4.6 noreply@anthropic.com

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures the openstack-port-cni-k8s charm is configured with the correct OpenStack region during loadbalancer (Amphora) CNI deployment, avoiding authentication failures in multi-region environments where the charm would otherwise default to RegionOne.

Changes:

  • Pass the deployment region (deployment.get_region_name()) into the loadbalancer CNI Terraform plan via a new tfvar.
  • Add a new Terraform variable openstack-port-cni-region to the deploy-cni plan.
  • Merge the region into the openstack-port-cni-k8s Juju application config alongside any existing charm config.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
sunbeam-python/sunbeam/features/loadbalancer/feature.py Passes the deployment region into the deploy-cni Terraform apply as an override tfvar.
sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/variables.tf Introduces a Terraform variable to carry the OpenStack region name into the plan.
sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/main.tf Injects the region into the openstack-port-cni-k8s charm config using merge().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/main.tf
openstack-port-cni-k8s has a 'region' config option used when
authenticating with OpenStack. Without it the daemon defaults to
RegionOne, which causes authentication failures in multi-region
deployments.

Add an 'openstack-port-cni-region' Terraform variable to the
deploy-cni plan and merge it into the charm's config block so that
a manifest-level config override cannot accidentally unset it.
Pass the value from deployment.get_region_name() in
DeployAmphoraInfraStep.run(), consistent with how other charms
in the deployment pick up the configured region.

Partial-Fix: https://bugs.launchpad.net/snap-openstack/+bug/2155113

Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gboutry gboutry merged commit 9cb70b7 into canonical:main Jun 4, 2026
6 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.

3 participants