Running upgrade steps for units
Tim Penhey
tim.penhey at canonical.com
Tue Sep 15 20:41:49 UTC 2015
On 15/09/15 19:38, William Reade wrote:
> Having the machine agent run unit agent upgrade steps would be a Bad
> Thing -- the unit agents are still actively running the old code at that
> point. Stopping the unit agents and managing the upgrade purely from the
> machine would be ok; but it feels like a lot of effort for very little
> payoff, so I'm most inclined to WONTFIX it and spend the energy on agent
> consolidation instead.
This still leaves us with the problem of the two upgrade steps that were
written to update the uniter state file, and how to handle this.
I do wonder if the rash of upgrade errors we saw as all units entered an
error state was a result of the upgrade step not being run when the
uniter code had expected it to have been run.
> Don't recall deciding not to execute upgrade steps on unit agents, but I
> can equally see why the agent code made that a rational decision, so,
> ehh. I suspect we should have had some tests that the upgrade framework
> rejected unit agent tags, though.
The upgrade framework never sends any unit tags. It would be like having
tests that user tags are rejected. Since the upgrade steps are often
tested in isolation with the tags they are expecting, I'm not sure how
you envision a test would do this.
I'll talk more with Menno this morning about how we can get something
rigged up until we get the agent consolidation.
Tim
>
> Cheers
> William
>
> On Tue, Sep 15, 2015 at 7:13 AM, Tim Penhey <tim.penhey at canonical.com
> <mailto:tim.penhey at canonical.com>> wrote:
>
> Hi William and Menno,
>
> I've been investigating this bug:
> https://bugs.launchpad.net/juju-core/+bug/1494070
>
> The upgrade steps were never planned to be executed for unit agents,
> only on machine agents, but there are two upgrade steps identified in
> this bug where they were clearly expecting to run for units.
>
> Obviously there is a need to be able to run steps for units, but I don't
> think we should add it to unit agents, especially given the desire to
> merge the agents in the near future.
>
> What I do think we should do is provide a helper function inside the
> upgrade package that will run a step for each unit passing in the
> unit tag.
>
> So what we really need is the ability for the API as connected to by a
> machine to ask for a list of units that should be running on that
> machine. Do we have an API or state function for this already? I haven't
> found on in my cursory look just now, but I thought I'd raise this and
> do a sanity check at the same time.
>
> There would be clear limitations for the upgrade steps for the units as
> the API connection as as a machine agent. However both the upgrade
> steps identified so far are just updating local disk state based on
> other disk state for a specified unit.
>
> Firstly does this sound like a reasonable approach?
>
> Tim
>
>
More information about the Juju-dev
mailing list