Hi Zhenghao, On 8/8/2018 4:10 AM, Zhenghao ZH21 Wang wrote:
Hi Sundar, All look good to me. And I agreed with the new solution as your suggestion. But I still confused why we will lost some device info if we do diff on agent? Could u give me an example to explain how to lost and what we will lost?
To do the diff, the agent would need the previous configuration of devices on the host. If it keeps that previous config in its process memory, it will lose it if it dies and restarts for any reason. So, it should persist it. The ideal place to persist that is the Cyborg db. So, let us say the agent writes the config to the db each time via the conductor.
However, consider the scenario where the agent pushes an update to the conductor, and restarts before the conductor has written it to the db. This can result in a race condition. If we don't address that properly, the agent may get the copy in the db and not the latest update. That is the loss we were talking about.
To prevent that race, the restarted agent should ask the conductor to get the latest, and the conductor must be smart enough to 'synchronize' with the previous unfinished update. This seems like unnecessary complication.
I think this is what you are asking about. If not, please let me know what you meant.
Best regards Zhenghao Wang Cloud Researcher Email: [email protected] Tel: (+86) 18519550096 Enterprise & Cloud Research Lab, Lenovo Research No.6 Shangdi West Road, Haidian District, Beijing
Regards, Sundar __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
