FullStatus API when machine or unit is StatusDown
I'm working on a change to make juju status report the remote unit when a relation hook fails (https://bugs.launchpad.net/juju-core/+bug/1194481). During this work I've noticed that the FullStatus client API does some munging of the agent state info string if the agent appears to be dead but shouldn't be. It replaces the agent state info string with (status: status info) (note the parens) and then changes the returned status to StatusDown. You've probably noticed juju status strings with parens around them before - this is why. This code is at state/apiserver/client/status.go:540. This is problematic for two reasons: 1. the client API code is making formatting decisions that should be left up to the client. In the case of the ticket I'm working on, the juju status command handler ends up having to detect and unpick the parens in status string while generating the status output so that it can correctly append the remote unit name. This is easy enough but ugly and feels wrong. 2. because the munging is done within the FullStatus API call, clients that are consuming events via a watcher will not see the munged status and info. If a client was to use both a watcher and FullStatus, it could see different status values for a unit or machine between the two APIs. 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. 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. 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. Thoughts? - Menno -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Re: Schema migration process
On 16/05/14 17:29, John Meinel wrote: So I'm pretty sure the ability to do schema upgrades was scoped in the HA work that Nate is working on. I believe the idea is roughly: OK, I see the card on the board on Nate's team for this iteration. Is it likely to get done? Since this is something that we (onyx) need for the identity work, and from the description given it looks like it could be broken up into several different branches, is it something that we could help with to get there sooner? Tim -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev