Comment 3 for bug 1951010

Revision history for this message
Sahid Orentino (sahid-ferdjaoui) wrote :

When Neutron server is starting, the in-memory variable ‘reported_hosts’ is an empty set. Whenever the segments reported by agents are already been initialized; The algorithm will execute the process of reporting mappings host/segments to Nova by creating for each segment an aggregate and by adding hosts.

We can notice some points regarding the current process:

 - It only reports mappings but does not report mapping that get removed (hosts or segments deleted)
 - It reports mappings that already exist which lead to a terrible flood in Nova for large deployments using segments.

Even if mappings and aggregates are persistent, it seems reasonable during a restart of Neutron to execute such rebuilding process.

To fix the issue, one suggestion is to initialize an in-memory datastructure shared by workers with hosts/segments mappings. When Neutron starts, the first worker that could acquire the lock would retrieves from database the mappings. The process could then compare and validate mappings received by agents to report changes if needed.

If there are no changes on a mapping, we could expect to have the related aggregate also in-sync.

Miguel, does that sounds reasonable for you? I can see you assigned to the ticket would you share with us your thinking?