Neutron中关于Devstack的源码分析
2017-11-27 19:22
471 查看
最近在配置适配DPDK的Openstack多节点环境,用到networking-ovs-dpdk的plugin,阅读了Neutron中关于Devstack的代码。
此处定义了neutron使用的插件,以及q-agt的名称还有核心插件的配置文件位置。另外q是neutron以前名字quantum的缩写。
Devstack
Settings
L2_AGENT_EXTENSIONS=${L2_AGENT_EXTENSIONS:-} if is_neutron_legacy_enabled; then NEUTRON_CORE_PLUGIN=$Q_PLUGIN NEUTRON_AGENT=$Q_AGENT # NOTE(ihrachys) those values are defined same way as in #lib/neutron_plugins/ml2:neutron_plugin_configure_common NEUTRON_CORE_PLUGIN_CONF_PATH=etc/neutron/plugins/ml2 NEUTRON_CORE_PLUGIN_CONF=$NEUTRON_CORE_PLUGIN_CONF_PATH/ml2_conf.ini fi
此处定义了neutron使用的插件,以及q-agt的名称还有核心插件的配置文件位置。另外q是neutron以前名字quantum的缩写。
Plugin.sh
LIBDIR=$DEST/neutron/devstack/lib source $LIBDIR/dns source $LIBDIR/flavors source $LIBDIR/l2_agent source $LIBDIR/l2_agent_sriovnicswitch source $LIBDIR/ml2 source $LIBDIR/qos source $LIBDIR/ovs source $LIBDIR/segments source $LIBDIR/trunk Q_BUILD_OVS_FROM_GIT=$(trueorfalse False Q_BUILD_OVS_FROM_GIT) if [ -f $LIBDIR/${NEUTRON_AGENT}_agent ]; then source $LIBDIR/${NEUTRON_AGENT}_agent fi if [[ "$1" == "stack" ]]; then case "$2" in install) if [[ "$NEUTRON_AGENT" == "openvswitch" ]] && \ [[ "$Q_BUILD_OVS_FROM_GIT" == "True" ]]; then remove_ovs_packages compile_ovs True /usr /var start_new_ovs fi ;; post-config) if is_service_enabled q-flavors neutron-flavors; then configure_flavors fi if is_service_enabled q-qos neutron-qos; then configure_qos fi if is_service_enabled q-trunk neutron-trunk; then configure_trunk_extension fi if is_service_enabled q-dns neutron-dns; then configure_dns_extension post_config_dns_extension fi if is_service_enabled neutron-segments; then configure_segments_extension fi if is_service_enabled q-agt neutron-agent; then configure_l2_agent fi #Note: sriov agent should run with OVS or linux bridge agent #because they are the mechanisms that bind the DHCP and router ports. #Currently devstack lacks the option to run two agents on the same node. #Therefore we create new service, q-sriov-agt, and the # q-agt/neutron-agent should be OVS or linux bridge. if is_service_enabled q-sriov-agt neutron-sriov-agent; then configure_$NEUTRON_CORE_PLUGIN configure_l2_agent configure_l2_agent_sriovnicswitch fi if [ $NEUTRON_CORE_PLUGIN = ml2 ]; then configure_ml2_extension_drivers fi ;; extra) if is_service_enabled q-sriov-agt neutron-sriov-agent; then start_l2_agent_sriov fi ;; esac elif [[ "$1" == "unstack" ]]; then if is_service_enabled q-sriov-agt neutron-sriov-agent; then stop_l2_agent_sriov fi if [[ "$NEUTRON_AGENT" == "openvswitch" ]] && \ [[ "$Q_BUILD_OVS_FROM_GIT" == "True" ]]; then stop_new_ovs fi fi
相关文章推荐
- 关于ArrayList经验分享(源码分析)
- 关于lua 5.1源码分析与相关有用摘要
- neutron 源码分析 restAPI
- 关于Spring启动时Context加载源码分析
- spring-data-mongo 关于_id 字段解析源码分析
- qemu-kvm-1.1.0源码中关于迁移的代码分析
- 关于北大ACM分析及源码分享的说明
- Hadoop HDFS源码分析 关于数据块的类
- OpenStack干货分享 | Neutron源码分析之L3
- jQuery 源码分析和使用心得 - 关于源码
- 关于java中ReentrantLock类的源码分析以及总结与例子
- 通过实例及源码分析关于SpringBoot启动类启动时自动配置问题
- qemu-kvm-1.1.0源码中关于迁移的代码分析
- 关于java集合的toString方法源码分析
- CE5.0关于设备管理器的源码分析
- 【neutron源码分析】create_network/create_subnet/create_port源码分析
- 关于hive RegexSerDe的源码分析 推荐
- 关于hive RegexSerDe的源码分析
- UE4关于XBox手柄控制源码分析
- 关于HashMap经验分享(源码分析)