Zookeeper driver doesn't work with multi-process neutron-server

Bug #1534504 reported by Li Ma
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DragonFlow
Fix Released
Medium
Li Ma

Bug Description

Zookeeper driver is under review:
https://review.openstack.org/#/c/264113/4

This bug report is to track the progress on this critical problem for zookeeper.

Problem Discovered:
Zookeeper operations are all blocked forever in Df core plugin, but works very well in DF_local_controller, using the same Zookeeper driver codebase.

The difference between DF_local_controller and neutron-server is that DF_local_controller is single process but neutron-server starts with multiple processes.

In neutron-server:

It first initialize core plugin and service plugins.
After that, it passes plugin objects to sub-process (workers).
It means that all the plugin objects are copied to multiple processes.

When initializing DF core plugin, it creates a DB client via DB-API layer. Zookeeper client-side has some local states which seems incompatible with multi-workers.

If we can initialize plugin objects after forking, it should work. However, it seems not realistic. You have to modify the neutron core mechanism. As a result, I will try to find how to make it in DF side.

Li Ma (nick-ma-z)
Changed in dragonflow:
assignee: nobody → Li Ma (nick-ma-z)
summary: - Zookeeper doesn't work with multi-process neutron-server
+ Zookeeper driver doesn't work with multi-process neutron-server
Changed in dragonflow:
status: New → In Progress
Li Ma (nick-ma-z)
Changed in dragonflow:
importance: Undecided → Medium
Revision history for this message
Eran Gampel (eran-gampel) wrote :

You can do some thing similar to what I did in the
Pub sub patch use a multi process queue
And just have one process send the message s
For all the process

or
You can initialize the client in the post fork
Initialize method in the df plugin
And run multiple clients

I am in the air port now I will add the links to the
Patch and the call back later

Revision history for this message
Li Ma (nick-ma-z) wrote :

Thanks for your suggestion. Actually I just solved it using lazy initialization. The zookeeper is working. :-)
I'm testing all the functionality (without PUB/SUB).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to dragonflow (master)

Reviewed: https://review.openstack.org/264113
Committed: https://git.openstack.org/cgit/openstack/dragonflow/commit/?id=4033d3833b6f71f549d752b28163dbe15cbda265
Submitter: Jenkins
Branch: master

commit 4033d3833b6f71f549d752b28163dbe15cbda265
Author: Li Ma <email address hidden>
Date: Sat Dec 26 13:31:30 2015 +0800

    Add Zookeeper driver for DB

    The devstack only supports ubuntu,
    because I don't have other envs.

    I'll update devstack scripts when I set
    up other envs.

    To solve the stateful client bug, lazy
    initialization is introduced.

    Change-Id: I3e74601f2b867b695578f18be2faf7efc33bc7aa
    Implements: blueprint zookeeper-driver
    Closes-Bug: #1534504

Changed in dragonflow:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.