enable pro fails on MAAS deploy

Bug #2069364 reported by Chris Johnston
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Snap
New
Undecided
Unassigned

Bug Description

2024.1/beta rev 528

Looking at the code [1] it looks like it's trying to relate ubuntu-pro and sunbeam-machine in the controller model. In a MAAS deployment, sunbeam-machine is in the openstack-machines model.

If I edit main.tf and change the name from controller to openstack-machines, the application deploys and relates successfully to sunbeam-machine.

Enabling pro should be included in both the controller model and the openstack-machines model as applicable.

[1] https://github.com/canonical/snap-openstack/blob/main/sunbeam-python/sunbeam/plugins/pro/etc/deploy-pro/main.tf

Enabling Ubuntu Pro support ... terraform apply failed: data.juju_model.controller: Reading...
data.juju_model.controller: Read complete after 0s [id=2ef6e2f8-ff81-4f9a-8e80-7e2310ff65e0]

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.ubuntu_pro[0] will be created
  + resource "juju_application" "ubuntu_pro" {
      + config = {
          + "token" = "nothappening"
        }
      + constraints = (known after apply)
      + id = (known after apply)
      + model = "controller"
      + name = "ubuntu-pro"
      + placement = (known after apply)
      + principal = (known after apply)
      + trust = false
      + units = 0

      + charm {
          + base = "ubuntu@22.04"
          + channel = "latest/stable"
          + name = "ubuntu-advantage"
          + revision = (known after apply)
          + series = (known after apply)
        }
    }

  # juju_integration.juju_info[0] will be created
  + resource "juju_integration" "juju_info" {
      + id = (known after apply)
      + model = "controller"

      + application {
          + endpoint = "juju-info"
          + name = "sunbeam-machine"
        }
      + application {
          + endpoint = "juju-info"
          + name = "ubuntu-pro"
        }
    }

Plan: 2 to add, 0 to change, 0 to destroy.
juju_application.ubuntu_pro[0]: Creating...
juju_application.ubuntu_pro[0]: Creation complete after 1s [id=controller:ubuntu-pro]
juju_integration.juju_info[0]: Creating...
juju_integration.juju_info[0]: Still creating... [10s elapsed]
juju_integration.juju_info[0]: Still creating... [20s elapsed]
juju_integration.juju_info[0]: Still creating... [30s elapsed]
juju_integration.juju_info[0]: Still creating... [40s elapsed]
juju_integration.juju_info[0]: Still creating... [50s elapsed]
juju_integration.juju_info[0]: Still creating... [1m0s elapsed]

Error: Client Error

  with juju_integration.juju_info[0],
  on main.tf line 50, in resource "juju_integration" "juju_info":
  50: resource "juju_integration" "juju_info" {

Unable to create integration, got error: the applications were not available
to be integrated

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

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.