juju does not know space in maas deployment

Bug #2068895 reported by Guillaume Boutry
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Snap
Triaged
High
Unassigned

Bug Description

Sunbeam is failing to deploy sunbeam-machine because the space `my_space` does not exist in juju. But this is part of networking validation to make sure this space is present in MAAS.

We should add an additional check, making sure the required spaces are seen by Juju in the infrastructure model.

Logs:
sunbeam cluster deploy
Enter a region name (cannot be changed later) (RegionOne): RegionOne
⠸ Deploying Sunbeam Machine ... terraform apply failed:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # juju_application.sunbeam-machine will be created
  + resource "juju_application" "sunbeam-machine" {
      + config = {
          + "http_proxy" = ""
          + "https_proxy" = ""
          + "no_proxy" = ""
        }
      + constraints = (known after apply)
      + endpoint_bindings = [
          + {
              + space = "my_space"
            },
        ]
      + id = (known after apply)
      + model = "openstack-machines"
      + name = "sunbeam-machine"
      + placement = (known after apply)
      + principal = (known after apply)
      + trust = false
      + units = 0

      + charm {
          + base = "ubuntu@22.04"
          + channel = "2024.1/edge"
          + name = "sunbeam-machine"
          + revision = (known after apply)
          + series = (known after apply)
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.
juju_application.sunbeam-machine: Creating...

Error: Client Error

  with juju_application.sunbeam-machine,
  on main.tf line 29, in resource "juju_application" "sunbeam-machine":
  29: resource "juju_application" "sunbeam-machine" {

Unable to create application, got error: unknown space "my_space"

Error: Command '['/snap/openstack/529/bin/terraform', 'apply', '-auto-approve', '-no-color']' returned non-zero exit status 1.

Changed in snap-openstack:
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → High
Revision history for this message
Andre Ruiz (andre-ruiz) wrote :

Seems like juju is losing the underscore:

It's called "my_space" in maas but "myspace" in juju:

xxxxxxx@client:~$ juju spaces -m openstack-machines
Name Space ID Subnets
alpha 0
myspace 1 10.40.53.0/24
                   172.16.1.0/24
                   192.168.2.0/24
                   fd42:36d7:83b7:2f87::/64

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.