Remove explicit eventlet.monkey_patch()
Change-Id: Idacf87355d6efabcd0d2714f05b4285ac39ad08b Closes-Bug: #1522784 Related-Bug: #1568220
This commit is contained in:
parent
418e51de71
commit
7eb5abdf4e
@ -290,7 +290,7 @@ function start_df {
|
||||
|
||||
if is_service_enabled df-controller ; then
|
||||
sudo ovs-vsctl --no-wait set-controller br-int tcp:$HOST_IP:6633
|
||||
run_process df-controller "python $DF_LOCAL_CONTROLLER --config-file $NEUTRON_CONF"
|
||||
run_process df-controller "$DF_LOCAL_CONTROLLER_BINARY --config-file $NEUTRON_CONF"
|
||||
run_process df-ext-services "bash $DEST/dragonflow/devstack/df-ext-services.sh"
|
||||
fi
|
||||
}
|
||||
@ -331,14 +331,16 @@ function verify_ryu_version {
|
||||
}
|
||||
|
||||
function start_pubsub_service {
|
||||
PUBLISHER_SERVICE=$DRAGONFLOW_DIR/dragonflow/controller/df_publisher_service.py
|
||||
set python $PUBLISHER_SERVICE
|
||||
set "$@" --config-file $NEUTRON_CONF
|
||||
run_process df-publisher-service "$*"
|
||||
echo "Starting Dragonflow publisher service"
|
||||
if is_service_enabled df-publisher-service ; then
|
||||
run_process df-publisher-service "$DF_PUBLISHER_SERVICE_BINARY --config-file $NEUTRON_CONF"
|
||||
fi
|
||||
}
|
||||
|
||||
function stop_pubsub_service {
|
||||
stop_process df-publisher-service
|
||||
if is_service_enabled df-publisher-service ; then
|
||||
stop_process df-publisher-service
|
||||
fi
|
||||
}
|
||||
|
||||
# main loop
|
||||
|
@ -8,8 +8,9 @@ DRAGONFLOW_BRANCH=${DRAGONFLOW_BRANCH:-master}
|
||||
|
||||
DF_L3_SERVICE_PLUGIN="dragonflow.neutron.services.l3.l3_controller_plugin.ControllerL3ServicePlugin"
|
||||
|
||||
DF_LOCAL_CONTROLLER=$DRAGONFLOW_DIR/dragonflow/controller/df_local_controller.py
|
||||
DF_L3_BINARY=${DF_L3_BINARY:-"$NEUTRON_BIN_DIR/df-l3-agent"}
|
||||
DF_L3_BINARY=$NEUTRON_BIN_DIR/df-l3-agent
|
||||
DF_LOCAL_CONTROLLER_BINARY=$NEUTRON_BIN_DIR/df-local-controller
|
||||
DF_PUBLISHER_SERVICE_BINARY=$NEUTRON_BIN_DIR/df-publisher-service
|
||||
|
||||
DF_L2_RESPONDER=${DF_L2_RESPONDER:-'True'}
|
||||
|
||||
|
17
dragonflow/cmd/eventlet/df_local_controller.py
Normal file
17
dragonflow/cmd/eventlet/df_local_controller.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from dragonflow.controller import df_local_controller
|
||||
|
||||
|
||||
def main():
|
||||
df_local_controller.main()
|
17
dragonflow/cmd/eventlet/df_publisher_service.py
Normal file
17
dragonflow/cmd/eventlet/df_publisher_service.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from dragonflow.controller import df_publisher_service
|
||||
|
||||
|
||||
def main():
|
||||
df_publisher_service.main()
|
@ -29,8 +29,6 @@ import six
|
||||
DF_PUBSUB_DRIVER_NAMESPACE = 'dragonflow.pubsub_driver'
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
eventlet.monkey_patch()
|
||||
|
||||
|
||||
def load_driver(driver_cfg, namespace):
|
||||
try:
|
||||
|
@ -17,8 +17,6 @@ import socket
|
||||
import sys
|
||||
import time
|
||||
|
||||
import eventlet
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
from oslo_utils import importutils
|
||||
@ -40,8 +38,6 @@ from ryu.base.app_manager import AppManager
|
||||
config.setup_logging()
|
||||
LOG = log.getLogger("dragonflow.controller.df_local_controller")
|
||||
|
||||
eventlet.monkey_patch()
|
||||
|
||||
cfg.CONF.register_opts(common_params.df_opts, 'df')
|
||||
|
||||
|
||||
@ -538,6 +534,3 @@ def main():
|
||||
common_config.init(sys.argv[1:])
|
||||
controller = DfLocalController(chassis_name)
|
||||
controller.run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
@ -11,7 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
import eventlet
|
||||
from Queue import Queue
|
||||
from eventlet.queue import Queue
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
@ -31,7 +31,6 @@ from dragonflow.common import utils as df_utils
|
||||
from dragonflow.db import db_common
|
||||
from dragonflow.db import pub_sub_api
|
||||
|
||||
eventlet.monkey_patch()
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -156,6 +155,3 @@ def main():
|
||||
service = PublisherService()
|
||||
service.initialize()
|
||||
service.run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
@ -30,8 +30,6 @@ from dragonflow.db.db_common import DbUpdate, SEND_ALL_TOPIC, \
|
||||
DB_SYNC_MINIMUM_INTERVAL
|
||||
from dragonflow.db import pub_sub_api
|
||||
|
||||
eventlet.monkey_patch()
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -13,9 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import eventlet
|
||||
eventlet.monkey_patch()
|
||||
|
||||
import inspect
|
||||
import random
|
||||
|
||||
|
@ -21,9 +21,8 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_serialization import jsonutils
|
||||
import redis
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
eventlet.monkey_patch()
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
cfg.CONF.register_opts(common_params.df_opts, 'df')
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from neutron.common import eventlet_utils
|
||||
|
||||
eventlet_utils.monkey_patch()
|
@ -50,6 +50,8 @@ neutron.db.alembic_migrations =
|
||||
dragonflow = dragonflow.db.neutron.migration:alembic_migrations
|
||||
console_scripts =
|
||||
df-db = dragonflow.cli.df_db:main
|
||||
df-local-controller = dragonflow.cmd.eventlet.df_local_controller:main
|
||||
df-publisher-service = dragonflow.cmd.eventlet.df_publisher_service:main
|
||||
df-l3-agent = dragonflow.cmd.eventlet.df_l3_agent:main
|
||||
dragonflow.pubsub_driver =
|
||||
zmq_pubsub_driver = dragonflow.db.pubsub_drivers.zmq_pubsub_driver:ZMQPubSub
|
||||
|
Loading…
Reference in New Issue
Block a user