Local variables in Neutron driver get flushed
I ran into a very strange situation while trying to write a new LBaaS driver for Neutron. Say if I write to some instance variables (self.xxx = yyy) in the call create_pool, then in the call create_vip I cannot access those variables - if they were initialized to some value in the __init__ method, I still see the initial value; otherwise I'm told there is no such attribute on the object.
It just looks like the __init__ was called by some code and the object was restored to its initial state; or was it serialized/deserialized somehow? I don't know. What I know is it's the same object since I put the id() value in logs. It's not multithreading issue either, I believe.
I tried to move such logic to the plugin code itself, and to the code behind the driver, but all is the same. Looks like all the things - from plugin to everything - are restored.
More info: I'm on formal Juno release, and the changes I made include:
- neutron/extensions/loadbalancer.py - add some attributes to "pools" in RESOURCE_ATTRIBUTE_MAP heat/engine/resources/neutron/loadbalancer.py
- add a value_specs (of type Map) to the properties schema for class Pool
- /etc/neutron/neutron.conf - comment
the default LB provider and add mine as the default
Any clues would be highly appreciated.
Thanks, Calvin