FullStatus API when machine or unit is StatusDown
William Reade
william.reade at canonical.com
Mon May 19 09:05:45 UTC 2014
On Mon, May 19, 2014 at 3:55 AM, Menno Smits <menno.smits at canonical.com>wrote:
>
>
> What I'd like to do is not have the client API munge the status info
> string and instead use the StatusData map to report the record the original
> status. When a unit or machine status is StatusDown a client can look in
> StatusData for the pre-agent-down status if it wants it.
>
+1 to this, but the new server still needs to generate the old data, so
that old clients can keep using the existing (agreed crazy) implementation;
new clients can fall back to outputting that when talking to an old server;
and a new client talking to a new server can build user output nicely out
of usefully orthogonal data.
It would also be good to move the "if agent down set the status to
> StatusDown" logic to somewhere deeper so that all clients get a consistent
> view of the status. I can live with it if this isn't feasible however -
> this part isn't necessary to get the ticket done.
>
Integrating this into the AllWatcher will be ...challenging, and you
shouldn't let it block progress on this bug. The least crazy way to do this
-- I think -- would be to add a presence worker that actively updates the
status data as it changes.
I'm concerned that this change may impact the GUI. As far as I can tell the
> GUI doesn't call FullStatus so any changes to that API shouldn't affect it
> (please correct me if I'm wrong). Changing how StatusDown is set however
> will probably impact the GUI.
>
I don't think the GUI ever sees presence information. That's a bug in
itself, but it doesn't affect the situation here; but it would again be
good if we were to keep presence information in StatusData, because then
the GUI would start to see those changes and could make use of them at
their leisure.
Cheers
William
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140519/ac7ca8dc/attachment.html>
More information about the Juju-dev
mailing list