Re: [openstack-dev] [TaskFlow] TaskFlow persistence: Job failure retry

2016-06-05 Thread Joshua Harlow
Cool, we'll feel free to find the taskflow (and others) either in #openstack-oslo or #openstack-state-management if you have any questions. -Josh pnkk wrote: I am working on NFV orchestrator based on MANO Regards, Kanthi On Thu, Jun 2, 2016 at 3:00 AM, Joshua Harlow mailto:harlo...@fastmail.

Re: [openstack-dev] [TaskFlow] TaskFlow persistence: Job failure retry

2016-06-05 Thread pnkk
I am working on NFV orchestrator based on MANO Regards, Kanthi On Thu, Jun 2, 2016 at 3:00 AM, Joshua Harlow wrote: > Interesting way to combine taskflow + celery. > > I didn't expect it to be used like this, but the more power to you! > > Taskflow itself has some similar capabilities via > htt

Re: [openstack-dev] [TaskFlow] TaskFlow persistence: Job failure retry

2016-06-01 Thread Joshua Harlow
Interesting way to combine taskflow + celery. I didn't expect it to be used like this, but the more power to you! Taskflow itself has some similar capabilities via http://docs.openstack.org/developer/taskflow/workers.html#design but anyway what u've done is pretty neat as well. I am assuming

Re: [openstack-dev] [TaskFlow] TaskFlow persistence: Job failure retry

2016-06-01 Thread pnkk
Thanks for the nice documentation. To my knowledge celery is widely used for distributed task processing. This fits our requirement perfectly where we want to return immediate response to the user from our API server and run long running task in background. Celery also gives flexibility with the w

Re: [openstack-dev] [TaskFlow] TaskFlow persistence: Job failure retry

2016-05-27 Thread Joshua Harlow
Seems like u could just use http://docs.openstack.org/developer/taskflow/jobs.html (it appears that you may not be?); the job itself would when failed be then worked on by a different job consumer. Have u looked at those? It almost appears that u are using celery as a job distribution system

Re: [openstack-dev] [TaskFlow] TaskFlow persistence: Job failure retry

2016-05-27 Thread pnkk
To be specific, we hit this issue when the node running our service is rebooted. Our solution is designed in a way that each and every job is a celery task and inside celery task, we create taskflow flow. We enabled late_acks in celery(uses rabbitmq as message broker), so if our service/node goes

[openstack-dev] [TaskFlow] TaskFlow persistence: Job failure retry

2016-05-27 Thread pnkk
Hi, When taskflow engine is executing a job, the execution failed due to IO error(traceback pasted below). 2016-05-25 19:45:21.717 7119 ERROR taskflow.engines.action_engine.engine 127.0.1.1 [-] Engine execution has failed, something bad must of happened (last 10 machine transitions were [('SCHED

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-03-23 Thread Joshua Harlow
On 03/23/2016 12:49 PM, pnkk wrote: Joshua, We are performing few scaling tests for our solution and see that there are errors as below: Failed saving logbook 'cc6f5cbd-c2f7-4432-9ca6-fff185cf853b'\n InternalError: (pymysql.err.InternalError) (1205, u'Lock wait timeout exceeded; try restartin

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-03-23 Thread Nikhil Komawar
Just throwing this out there: May be the sessions are open o_O? If you're using sqlalchemy to talk to the DB then may be open and close the sessions per transaction than keep them open for all threads? On 3/23/16 3:49 PM, pnkk wrote: > Joshua, > > We are performing few scaling tests for our solut

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-03-23 Thread pnkk
Joshua, We are performing few scaling tests for our solution and see that there are errors as below: Failed saving logbook 'cc6f5cbd-c2f7-4432-9ca6-fff185cf853b'\n InternalError: (pymysql.err.InternalError) (1205, u'Lock wait timeout exceeded; try restarting transaction') [SQL: u'UPDATE logbooks

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-03-20 Thread Joshua Harlow
Lingxian Kong wrote: Kanthi, sorry for chiming in, I suggest you may have a chance to take a look at Mistral[1], which is the workflow as a service in OpenStack(or without OpenStack). Out of curiosity, why? Seems the ML post was about 'TaskFlow persistence' not mistral, just saying (unsure how

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-03-20 Thread Lingxian Kong
Kanthi, sorry for chiming in, I suggest you may have a chance to take a look at Mistral[1], which is the workflow as a service in OpenStack(or without OpenStack). [1]: http://docs.openstack.org/developer/mistral/ On Sun, Mar 20, 2016 at 5:35 AM, pnkk wrote: > Filed it at https://bugs.launchpad.n

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-03-19 Thread pnkk
Filed it at https://bugs.launchpad.net/taskflow/+bug/1559496 Thanks, Kanthi On Sat, Mar 19, 2016 at 9:30 PM, Joshua Harlow wrote: > Interesting error, that could be a bug and perhaps we should ensure > upgrade is more thread-safe (with a lock on upgrade); can u open a bug @ > bugs.launchpad.net

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-03-19 Thread Joshua Harlow
Interesting error, that could be a bug and perhaps we should ensure upgrade is more thread-safe (with a lock on upgrade); can u open a bug @ bugs.launchpad.net/taskflow for that and we can try to add said lock (that should hopefully resolve what u are seeing, although if it doesn't then the bug

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-03-19 Thread pnkk
Hi Joshua, Thanks for all your inputs. We are using this feature successfully. But I rarely see an issue related to concurrency. To give you a brief, we use eventlets and every job runs in a separate eventlet thread. In the job execution part, we use taskflow functionality and persist all the de

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-02-12 Thread Joshua Harlow
pn kk wrote: Hi Joshua, Yes, sure will do that once I get some window out of my work. One last query(hopefully :) ) , can the factory method be an instance method of a class? Instance methods are particularly hard to use (since they require an instance of an object to be useful); so I think

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-02-11 Thread pn kk
Hi Joshua, Yes, sure will do that once I get some window out of my work. One last query(hopefully :) ) , can the factory method be an instance method of a class? I tried giving it as "FlowFactory().flow_factory", where FlowFactory is my class name. It failed with below error: ValueError: Flow fa

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-01-27 Thread Joshua Harlow
pn kk wrote: Hi, Thanks for the responses. Putting it in a small example def flow_factory(tmp): return lf.Flow('resume from backend example').add( TestTask(name='first', test=tmp), InterruptTask(name='boom'), TestTask(name='second', test="second task")) class T

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-01-27 Thread pn kk
Hi, Thanks for the responses. Putting it in a small example def flow_factory(tmp): return lf.Flow('resume from backend example').add( TestTask(name='first', test=tmp), InterruptTask(name='boom'), TestTask(name='second', test="second task")) class TestTask(task.Task):

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-01-26 Thread Joshua Harlow
Hi there, Michał is correct, it should be saved. Do u have a small example of what u are trying to do because that will help determine if what u are doing will be saved or whether it will not be. Or even possibly explaining what is being done would be fine to (more data/info for me to reason

Re: [openstack-dev] [TaskFlow] TaskFlow persistence

2016-01-26 Thread Michał Dulko
On 01/26/2016 10:23 AM, pn kk wrote: > Hi, > > I use taskflow for job management and now trying to persist the state > of flows/tasks in mysql to recover incase of process crashes. > > I could see the state and the task results stored in the database. > > Now I am looking for some way to store the

[openstack-dev] [TaskFlow] TaskFlow persistence

2016-01-26 Thread pn kk
Hi, I use taskflow for job management and now trying to persist the state of flows/tasks in mysql to recover incase of process crashes. I could see the state and the task results stored in the database. Now I am looking for some way to store the input parameters of the tasks. Please share your