canonical / juju-verify

https://launchpad.net/juju-verify
GNU General Public License v3.0
2 stars 7 forks source link

Enable targeting juju machines #131

Closed esunar closed 1 year ago

esunar commented 1 year ago

In addition to using juju-verify on list of units, it should be also possible to target one (or more) machine. Expected behavior is that juju-verify would collect all principal units running on those machines and treat it as if those units were passed as an argument.

Usage example:

Targeting units

$ juju-verify reboot --units nova-compute/0 nova-compute/1

Targeting machines

$ juju-verify reboot --machines 0 1


Imported from Launchpad using lp2gh.

esunar commented 1 year ago

(by aluria) The "--machines" target should also flag if there are KVMs or LXDs running in the specified machine IDs.

For the initial implementation, warning if there are containers or VMs should be enough. Another bug will be filed to lookup which applications would be running inside the containers/VMs so they can be treated as "machines-inside-machines".

As an example, if a machine "0" exists,

esunar commented 1 year ago

(by martin-kalcok) should this be tied to the "--machines" flag only? We are already checking affected machines for presence of other principal units regardless of target (--units/--machines) maybe we can add the check for vm/container presence there.