sunbeam is ignoring the manifest config for microceph

Bug #2069097 reported by Andre Ruiz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Snap
Fix Committed
High
Hemanth Nakkina

Bug Description

I just noticed that, although the manifest contains the following config (actually just included from the edge template manifest in the charm, not changed by me):

---
software:
  charms:
    microceph:
      channel: reef/edge
      config:
        snap-channel: reef/edge
---

the installed snap in the system is not that one.... it is instead:

---
+ snap list | grep microceph
microceph 18.2.0+snap71f71782c5 981 reef/stable canonical** held
---

I also noticed that the charm itself is indeed edge, just the snap is not:

---
$ juju status -m admin/controller | grep microceph | head -n1
microceph active 3 microceph reef/edge 47 no
---

Which means the option from the manifest is being lost somewhere in the path to the terraform command.

The terraform plan has stable as its default, as can be seen in [1]. But the code in [2] seems to overwrite it without considering prior values, losing the manifest configs.

Anyway, terraform is not getting it because it is not being included in the parameters:

---
616 00:56:47,114 sunbeam.commands.terraform DEBUG Applying plan microceph-plan with tfvars {'charm_microceph_channel': 'reef/beta', 'charm_microceph_config': {'default-pool-size': 3}, 'endpoint_bindings': [{'space': 'admin-s pace'}, {'endpoint': 'admin', 'space': 'admin-space'}, {'endpoint': 'peers', 'space': 'admin-space'}, {'endpoint': 'cluster', 'space': 'admin-space'}, {'endpoint': 'public', 'space': 'admin-space'}, {'endpoint': 'ceph', 'space': 'admin-space'}, {'endpoint': 'mds', 'space': 'admin-space'}, {'endpoint': 'radosgw', 'space': 'admin-space'}], 'machine_ids': [], 'machine_model': 'openstack-machines'}
---

Or the terraform output itself:

---
Terraform will perform the following actions:

  # juju_application.microceph will be created
  + resource "juju_application" "microceph" {
      + config = {
          + "default-pool-size" = "3"
          + "snap-channel" = "reef/stable"
        }
      + constraints = (known after apply)
      + endpoint_bindings = [
          + {
[...]
---

The option is not there, so it is installing stable instead.

[1] - https://github.com/canonical/snap-openstack/blob/001b172524f9ad9a7484ac28f881b4990a7bb903/cloud/etc/deploy-microceph/variables.tf#L34
[2] - https://github.com/canonical/snap-openstack/blob/001b172524f9ad9a7484ac28f881b4990a7bb903/sunbeam-python/sunbeam/commands/microceph.py#L159

---

Tags: open-2207
Revision history for this message
Hemanth Nakkina (hemanth-n) wrote :

As Andre pointed out, any config set for microceph in manifest is ignored.

Changed in snap-openstack:
status: New → Triaged
importance: Undecided → High
tags: added: open-2207
Changed in snap-openstack:
assignee: nobody → Hemanth Nakkina (hemanth-n)
Revision history for this message
Hemanth Nakkina (hemanth-n) wrote :

PR merged: https://github.com/canonical/snap-openstack/pull/254

Released in 2024.1/edge

Changed in snap-openstack:
status: Triaged → Fix Committed
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.