On 15/11/14 15:44, Stuart Bishop wrote: > On 14 November 2014 22:31, Mario Splivalo <[email protected]> > wrote: >> Hello, good people! >> >> How hard would it be to implement 'showing running relations in juju >> status'? >> >> Currently there is no easy (if any) way of knowing the state of the >> deployment. When one does 'juju add-relation' the relation hooks are >> run, but there is no feedback on weather the hooks are still running or >> everything is done. Only in case there is a hook error you would see >> that one in 'juju status'. One can have logs tailed and assume that when >> there is no action for some amount of time - everything deployed as it >> should. >> >> Having juju status display number of running hooks would greatly help in >> troubleshooting deployments. > > This has been my most wanted feature for well over a year, and at the > moment is covered by > https://bugs.launchpad.net/juju-core/+bug/1254766. Unfortunately, I > don't think the work has been scheduled and I don't think the latest > round of updates to 'juju status' cover it. >
The new Juju Status work planned for this cycle will hopefully address the main concern about knowing when a deployed charm is fully ready to do the work for which it was installed. ie the current situation whereby a unit is marked as Started but it not ready. Charms are able to mark themselves as Busy and also set a status message to indicate they are churning and not ready to run. Charms can also indicate that they are Blocked and require manual intervention (eg a service needs a database and no relation has been established yet to provide the database), or Waiting (the database on which the service relies is busy but will resolve automatically when the database is available again). A status-set hook tool will be provided and can be run inside any hook. The exact syntax is still being finalised, but will be along the lines of: status-set <installing | running | busy | blocked | waiting> “message” [--waiting-on <some blocker>] [--blocked-on <some blocker>] This mechanism allows charms to give much more meaningful and precise feedback as to their state and if not Running, why not. There will also be a facility to allow charms to set their status outside of a hook, so that arbitrary service interruptions or issues can be communicated at any time (eg a database goes down for scheduled maintenance at a set time, can mark itself as Busy while that happens). So although there are not currently plans to show the number of running hooks in the first phase of this work, mechanisms are being provided to allow charm authors to better communicate the state of their charms to give much clearer and more accurate feedback as to 1) when a charm is fully ready to do work, 2) if a charm is not ready to do work, why not. -- Juju-dev mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
