Why can't I use --force in bundles?


This question recently came up and I wanted to put the logic down in writing to share the thinking on it.

Some commands, including deploy, have a --force flag that will bypass checking things like the series is a valid series for the charm, or that the lxd profile is deemed safe. This is mostly meant a development and testing tool. When a new series comes out one might want to be able to easily check “does this charm pass tests” or the like before going in and modifying the charm stating it supports a series it doesn’t. --force is a bypass of Juju enforcing best practices and as an operations tool it’s built on the idea of shared best practice expertise.

In light of this, a bundle is meant to be a reusable chunk of those best practices. When you install the openstack-base bundle it’s setup to get you a running OpenStack with some best practice config, versions, etc. These bundles aren’t often over analyzed and if a --force is required to make something work we want to make sure that users can’t accidentally do this. I compare this to the old sudo bash ... for scripts you find on the internet.

The standard for what goes into bundles high and so Juju doesn’t allow a --force in bundles so that they’re kept to a standard of best practices and encourages folks to engage upstream, update the charms for new series, and provide a little extra safety for end users.


I don’t see why we can’t use --force for bundles, but we’d want to carefully decide what it means.