canonical / juju-lint

Run checks against a juju model
GNU General Public License v3.0
0 stars 4 forks source link

Detect services affected by deferred events #216

Open zxhdaze opened 6 months ago

zxhdaze commented 6 months ago

Several OpenStack charms provide the functionality to defer events [0].

The units report they are deferring events on the unit status, like this:

App Version Status Scale Charm Store Channel Rev OS Message neutron-openvswitch 16.3.0 active 2 neutron-openvswitch charmstore 433 ubuntu Unit is ready nova-compute 21.1.2 active 2 nova-compute charmstore 537 ubuntu Unit is ready.

Unit Workload Agent Machine Public address Ports Message nova-compute/0 active idle 6 172.20.0.13 Unit is ready.   neutron-openvswitch/1 active idle 172.20.0.13 Unit is ready. Services queued for restart: openvswitch-switch nova-compute/1 active idle 7 172.20.0.4 Unit is ready   neutron-openvswitch/0 active idle 172.20.0.4 Unit is ready

Juju-lint should detect this condition and notify accordingly, as staying in this condition is not a desired state (it exists for very particular cloud maintenance purposes)

[0] https://docs.openstack.org/charm-guide/latest/admin/deferred-events.html