[feature request] juju config --wait

Bug #1866171 reported by Marian Gasparovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

It would be great for automation if juju config could block until change is finished (change hook finished)
Something like
`juju config --wait app key=value`

Right now we are forced to hack around this thing.

tags: added: cdo-qa
Revision history for this message
Richard Harding (rharding) wrote :

Is there any reason in particular this doesn't fall into the normal use of the juju wait plugin to make changes, then wait for them to settle vs needing it on a single specific call? My concern is that a config-change could trigger different relation updates and such but it would be a bit of a "false promise" that it's "done".

Changed in juju:
status: New → Triaged
importance: Undecided → Wishlist
tags: added: foundations-engine
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

We ended up needing it for this case:

#1. juju wait until everything is settled
#2. issue a juju config run=true on the glance-simplestreams-sync app to turn on syncing. (this is actually a bug in the gsss or glance charms: bug 1861005)
#3. wait for the config hook to complete
#4. sleep 60 seconds because the config hook sets up a timer that starts the syncing
#5. use juju wait to wait for the application status to show the syncing has completed

Revision history for this message
Marian Gasparovic (marosg) wrote :

Basically any situation when you need to change a config and then run a command which depends on that config to be applied.

Revision history for this message
Richard Harding (rharding) wrote :

I'm missing why the pattern of

  #1: juju wait until it's settled
  #2: issue config change
  #3: juju wait until it's settled again

Doesn't work out? This seems like another form of juju wait with some narrower context (the config-changed hook)?

Revision history for this message
Marian Gasparovic (marosg) wrote :

Well, because we had to bypass another race condition in glance-simplestreams-sync we set it to run:false. Then waited till juju was settled and set run to true. So at this stage juju is stable and it would continue immediately before gsss downloads files

Revision history for this message
Tim Penhey (thumper) wrote : Re: [Bug 1866171] Re: [feature request] juju config --wait

In a distributed async system there is no guarantee that it will ever be
processed in a timely manner. Especially if an agent is down.

I don't think adding a --wait option to changing config is reasonable.

On Wed, Mar 11, 2020 at 4:21 AM Marian Gasparovic <
<email address hidden>> wrote:

> Well, because we had to bypass another race condition in glance-
> simplestreams-sync we set it to run:false. Then waited till juju was
> settled and set run to true. So at this stage juju is stable and it
> would continue immediately before gsss downloads files
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: Juju bugs
> https://bugs.launchpad.net/bugs/1866171
>
> Title:
> [feature request] juju config --wait
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1866171/+subscriptions
>

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Wishlist → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.