canonical / stsstack-bundles

8 stars 24 forks source link

Rename --default-binding to --default-space #173

Open WizardBit opened 7 months ago

WizardBit commented 7 months ago

This was quite confusing for me to research and debug. I eventually found that I needed to provide a juju space name from the juju spaces command. Help from ./generate-bundle.sh --help does not mention anything about requiring an argument with option --default-binding nor about a juju space.

From

--default-binding
        Default Juju binding to use when using Juju placement with MAAS.

To

--default-space
        Default Juju space to use when using Juju placement with MAAS.

This is with Juju version 3.3.1. At first I thought it was one of the commands that got renamed with the release of Juju 3.0 but the release notes does not mention such a change.

dosaboy commented 7 months ago

There is some information at https://juju.is/docs/juju/binding but bascially juju has spaces and charms/applications "bind" to one or more spaces. Each charm has a "bindings:" section in which you can list the spaces you want it to bind to when deployed and there is also the "default" binding '': <name> which is what --default-binding sets. This binding defines the space units will bind to if no other bindings are defined.

WizardBit commented 7 months ago

That clears up a lot of confusion for me now, but would it be possible to create an alias or more detailed description for this option? Also to follow the current convention --default-binding should be --default-binding b like it is for name, series, and release.

--default-binding b
        Default Juju space units will bind to when using Juju placement with MAAS.
dosaboy commented 7 months ago

yep sounds good lets get that updated