Unit state during charm upgrade

Kapil Thangavelu kapil.thangavelu at canonical.com
Mon Mar 5 19:05:18 UTC 2012


Excerpts from Clint Byrum's message of 2012-03-05 12:51:38 -0500:
> Excerpts from Gary Poster's message of Mon Mar 05 08:27:11 -0800 2012:
> > On 03/05/12 11:22, Benji York wrote:
> > > On Mon, Mar 5, 2012 at 11:10 AM, Gary Poster<gary.poster at canonical.com>  wrote:
> > >> With Francesco's proposed change, the test does this.
> > >> - start upgrade
> > >> - loop until the status is no longer "updating".  If we never see the
> > >> "updating" status that's fine: it must have been a fast update, but now we
> > >> know we are ready to test the result of the update.
> > >
> > > The above would work as long as the command to start the upgrade doesn't
> > > return until the state transition from "running" to "updating" takes
> > > place.  In other words, this sequence of events should not be possible:
> > >
> > > - upgrade is initiated
> > > - juju status shows "running"
> > > - juju status shows "upgrading"
> > > - juju status shows "running"
> > 
> > Agreed.  Another alternative is that the version number does not change 
> > until the "upgrading" status displays; then we can check for the new 
> > version number & "running".  Only slightly more to do in the test loop.
> 
> I think the only logical thing is to display the charm version that is
> actually running, and the new charm is not actually running until after
> upgrade-charm has been executed and completed.
> 


Yeah.. this sounds like the most reasonable thing to me, ie. exposing the unit 
charm version, its available right now just not exposed via status. Its a good 
marker that the upgrade is in progress, but it is changed right before the 
unit's upgrade-changed hook is invoked, ie. as soon as the newer charm version 
is on disk. The upgrade isn't technically complete till this hook has been invoked. 

cheers,

Kapil



More information about the Juju mailing list