dump-lxd-remotes does not produce a usable yaml file

Bug #2058558 reported by Brian Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Auto Package Testing
Fix Released
Undecided
Skia

Bug Description

I wanted to set the `n-workers` value for the autopkgtest-cloud-workers using juju config so I looked at dump-lxd-remotes to figure out how to produce a yaml file to set the value. However, the yaml file produced by "juju config autopkgtest-lxd-worker lxd-remotes" is actually usable. I needed to construct a yaml file that looked like this:

autopkgtest-cloud-worker:
  n-workers:
    " lcy02:\n amd64: 65\n bos01:\n arm64: 20\n ppc64el: 20\n s390x: 20\n bos02:\n arm64: 20\n ppc64el: 20\n s390x: 22\n bos03:\n arm64: 25"

Manipulating the output of the juju config to produce something like this seems rather hard, so maybe there is another format that would work? I actually looked at canonical-mojo-specs for ideas on the proper formatting so maybe somebody else can figure out the right format.

dump-lxd-remotes needs fixing to produce something usable be it ugly or beautiful. Additionally, it would be lovely if we use the same script to dump the n-workers ... something like yaml-dump autopkgtest-cloud-worker n-workers.

Related branches

Revision history for this message
Brian Murray (brian-murray) wrote :

If you haven't seen it the launchpad page for the mojo specs is at https://code.launchpad.net/~canonical-is/canonical-mojo-specs/trunk .

Revision history for this message
Tim Andersson (andersson123) wrote :

Strange that it needed both the fields i.e. `autopkgtest-cloud-worker` and `n-workers`... Also, you state that the yaml file produced by `juju config autopkgtest-lxd-worker lxd-remotes` is usable, is the one from:
```
juju config autopkgtest-cloud-worker n-workers
```
not also usable? I'll do some investigation.

Maybe we could write a script and put it in the `mojo/` directory for this? Like

`update-n-workers`?

Revision history for this message
Tim Andersson (andersson123) wrote :

I can look into this today.

Revision history for this message
Tim Andersson (andersson123) wrote :

Skia has more context so he'll take this bug on.

Skia (hyask)
Changed in auto-package-testing:
status: New → In Progress
assignee: nobody → Skia (hyask)
Revision history for this message
Brian Murray (brian-murray) wrote :

Has this landed in production yet?

Revision history for this message
Tim Andersson (andersson123) wrote :

Yes, it's landed.

Changed in auto-package-testing:
status: In Progress → Fix Released
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.