the root cause is that a connection to a rootwrap daemon is shared among eventlet threads.
Instructing users to flush data after an eventlet context switch is not a real solution.
multiprocessing seems to have been written in multithreading in mind, but unfortunately it is written for threading, which is a fork based thread implementation and isn't compatible with eventlet.
I think we have 2 options:
1. make a new connection every time when Client.execute is called.
This is not easy as multiprocessing.BaseProxy has a class variable to share the connection, and it's buried deep in the multiprocessing lib.
2. protect Client.execute with a eventlet mutex against simultaneous calls.
My assumption is that oslo.rootwrap doesn't want to depend on eventlet. eventlet detection can be a bit tricky.
In reply to #15,
the root cause is that a connection to a rootwrap daemon is shared among eventlet threads.
Instructing users to flush data after an eventlet context switch is not a real solution.
multiprocessing seems to have been written in multithreading in mind, but unfortunately it is written for threading, which is a fork based thread implementation and isn't compatible with eventlet.
I think we have 2 options:
1. make a new connection every time when Client.execute is called. .BaseProxy has a class variable to share the connection, and it's buried deep in the multiprocessing lib.
This is not easy as multiprocessing
2. protect Client.execute with a eventlet mutex against simultaneous calls.
My assumption is that oslo.rootwrap doesn't want to depend on eventlet. eventlet detection can be a bit tricky.