[openstack-dev] [TaskFlow] Cross-run persistence

Joshua Harlow harlowja at outlook.com
Wed Aug 12 19:49:03 UTC 2015


On Wed, 12 Aug 2015 10:31:03 -0700
Demian Brecht <demianbrecht at gmail.com> wrote:

> 
> > On Aug 10, 2015, at 1:18 PM, Joshua Harlow <harlowja at outlook.com>
> > wrote:
> > 
> > Is that what u are looking for? (or possibly something else?),
> 
> Hi Josh,
> 
> Thanks for the reply. I haven’t had time to dig into it much further,
> but I’m not sure that’s what I’m looking for (unless I’m missing
> something in initial configuration. What I have tried so far is
> something to the effect of:
> 
> store = {‘foo’: ‘bar’}
> class MyAuthTask(task.Task):
>     default_provides = ‘auth_token’
> 
>     def execute(self):
>         return ‘mytoken'
> 
> engine = engines.load(flow, …, store=store)
> engine.run()
> print(store)
> 
> What I’m trying to get at is to selectively persist the token. In
> this case, after engine execution, values injected to the store are
> no longer there. If I understand how the engine works (which I may
> not, I’ve only been looking into this /very/ lightly over the last
> few days), as tasks are executed, what they provide is injected into
> the store. Unless you specifically tell the system to not
> purge /anything/ from the store, all will be lost once the engine is
> complete. I also don’t want to /all/ data to persist, but only select
> items (i.e. tokens).

Hmmm, I'll be out on vacation for a couple weeks, so feel free to jump
on IRC and ask there, but the summary u have is mostly correct, but
what u have to do that I don't see in the above is specify which
persistence backend the engine should be using, if none is selected
then all data saved goes into memory (and therefore is lost when the
program is done).

Once u get that working things will be persisted, although selective
persistence isn't currently possible, but could be done in a somewhat
easy manner (as long as we are clear on what i means and/or implies),

Once u get the persistence working,
http://docs.openstack.org/developer/taskflow/persistence.html should
help here then feel free to possibly submit some kind of oslo-spec or
blueprint for 'selective persistence' (or other better named thing); if
u want to work on said code, that's even better :)

Spec template @
https://github.com/openstack/oslo-specs/tree/master/specs

Irc folks usually @ #openstack-state-management and/or #openstack-oslo
(should be folks there that can help while i'm out...)

-Josh

> 
> Am I misunderstanding something here?
> 
> Thanks again,
> Demian
> 
> -------
> GPG Fingerprint: 9530 B4AF 551B F3CD A45C  476C D4E5 662D DB97 69E3
> 




More information about the OpenStack-dev mailing list