See also: Agent introspection
The juju_leases
function queries the juju lease management for a snapshot of the current time and displays the data in human readable yaml output. Data is only displayed when run on a controller machine.
This is primarily useful to developers to help debug problems that may be occurring in deployed systems. Advanced admin can also use the data before using juju_revoke_lease
.
Usage
Can be run on any juju machine.
juju_leases [-m <partial-model-uuid>] [<partial-app-name>...]
Run with application name:
juju_leases lxd
Run with part of a specific model uuid:
juju_leases -m 5de88ec2
Example output
Example output specifying an application name:
model-leases:
5de88ec2-92fd-47e7-802d-8eceb26a07f2:
lxd:
holder: lxd/0
lease-acquired: 15s ago
lease-expires: 45s
Example output where part of a specific model uuid was provided:
controller-leases:
5de88ec2-92fd-47e7-802d-8eceb26a07f2:
holder: machine-0
lease-acquired: 26s ago
lease-expires: 34s
model-leases:
5de88ec2-92fd-47e7-802d-8eceb26a07f2:
glance:
holder: glance/0
lease-acquired: 19s ago
lease-expires: 41s
keystone:
holder: keystone/0
lease-acquired: 23s ago
lease-expires: 37s
lxd:
holder: lxd/0
lease-acquired: 10s ago
lease-expires: 50s
Full output example:
controller-leases:
5de88ec2-92fd-47e7-802d-8eceb26a07f2:
holder: machine-0
lease-acquired: 7s ago
lease-expires: 53s
255aa237-7391-4c2c-8258-a304ea5b37a2:
holder: machine-0
lease-acquired: 15s ago
lease-expires: 45s
792f6afc-d239-427c-8563-a5ae6c2e011e:
holder: machine-0
lease-acquired: 7s ago
lease-expires: 53s
d573aac6-253c-4f26-83a3-d18311680d17:
holder: machine-0
lease-acquired: 15s ago
lease-expires: 45s
model-leases:
5de88ec2-92fd-47e7-802d-8eceb26a07f2:
glance:
holder: glance/0
lease-acquired: 1s ago
lease-expires: 59s
keystone:
holder: keystone/0
lease-acquired: 5s ago
lease-expires: 55s
lxd:
holder: lxd/0
lease-acquired: 21s ago
lease-expires: 39s
mysql:
holder: mysql/0
lease-acquired: 1s ago
lease-expires: 59s
neutron-api:
holder: neutron-api/0
lease-acquired: 2s ago
lease-expires: 58s
...