diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-10-27 09:30:52 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-10-27 09:30:52 -0400 |
commit | 8556c69838177bd7d13a5d281d8cdf4032f96afc (patch) | |
tree | 8977db7909d63cd593d179cc27bc7ded4e5d89f7 /meta-openstack/recipes-devtools/python/python-neutron_git.bb | |
parent | 86b80ab2e9cbb3a7dfc1164b0205eaffcf4f2363 (diff) | |
download | meta-cloud-services-8556c69838177bd7d13a5d281d8cdf4032f96afc.tar.gz |
neutron: move from OVS unified to OVS ml2 plugin
Juno removes support for the unified OVS and linuxbridge plugins. So
we switch to the ml2 OVS plugin.
This involves configuration and packaging changes.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-neutron_git.bb')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-neutron_git.bb | 89 |
1 files changed, 41 insertions, 48 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb index 677730f..8ecd4d3 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb +++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb | |||
@@ -4,12 +4,10 @@ SECTION = "devel/python" | |||
4 | LICENSE = "Apache-2.0" | 4 | LICENSE = "Apache-2.0" |
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" |
6 | 6 | ||
7 | PR = "r0" | 7 | PR = "r1" |
8 | SRCNAME = "neutron" | 8 | SRCNAME = "neutron" |
9 | 9 | ||
10 | SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=master \ | 10 | SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=master \ |
11 | file://ovs_neutron_plugin.ini \ | ||
12 | file://linuxbridge_conf.ini \ | ||
13 | file://neutron-server.init \ | 11 | file://neutron-server.init \ |
14 | file://neutron-agent.init \ | 12 | file://neutron-agent.init \ |
15 | file://l3_agent.ini \ | 13 | file://l3_agent.ini \ |
@@ -51,36 +49,41 @@ do_install_append() { | |||
51 | NEUTRON_CONF_DIR=${D}${sysconfdir}/neutron | 49 | NEUTRON_CONF_DIR=${D}${sysconfdir}/neutron |
52 | 50 | ||
53 | install -d ${NEUTRON_CONF_DIR} | 51 | install -d ${NEUTRON_CONF_DIR} |
54 | install -d ${NEUTRON_CONF_DIR}/plugins/openvswitch | 52 | install -d ${NEUTRON_CONF_DIR}/plugins/ml2 |
55 | install -d ${NEUTRON_CONF_DIR}/plugins/linuxbridge | ||
56 | 53 | ||
57 | install -m 600 ${TEMPLATE_CONF_DIR}/neutron.conf ${NEUTRON_CONF_DIR}/ | 54 | install -m 600 ${TEMPLATE_CONF_DIR}/neutron.conf ${NEUTRON_CONF_DIR}/ |
58 | install -m 600 ${WORKDIR}/ovs_neutron_plugin.ini ${NEUTRON_CONF_DIR}/plugins/openvswitch/ | ||
59 | install -m 600 ${WORKDIR}/linuxbridge_conf.ini ${NEUTRON_CONF_DIR}/plugins/linuxbridge/ | ||
60 | install -m 600 ${S}/etc/api-paste.ini ${NEUTRON_CONF_DIR}/ | 55 | install -m 600 ${S}/etc/api-paste.ini ${NEUTRON_CONF_DIR}/ |
61 | install -m 600 ${S}/etc/policy.json ${NEUTRON_CONF_DIR}/ | 56 | install -m 600 ${S}/etc/policy.json ${NEUTRON_CONF_DIR}/ |
57 | install -m 600 ${TEMPLATE_CONF_DIR}/neutron/plugins/ml2/* ${NEUTRON_CONF_DIR}/plugins/ml2 | ||
62 | 58 | ||
63 | #sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ | 59 | # Neutron.conf config changes (replace with .ini file editing) |
64 | # -i ${NEUTRON_CONF_DIR}/neutron.conf | 60 | sed -e "s:^# core_plugin.*:core_plugin = ml2:g" -i ${NEUTRON_CONF_DIR}/neutron.conf |
65 | #sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${NEUTRON_CONF_DIR}/neutron.conf | 61 | sed -e "s:^# service_plugins =.*:service_plugins = router:g" -i ${NEUTRON_CONF_DIR}/neutron.conf |
66 | #sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ | 62 | sed -e "s:^# allow_overlapping_ips = False:allow_overlapping_ips = True:g" -i ${NEUTRON_CONF_DIR}/neutron.conf |
67 | # -i ${NEUTRON_CONF_DIR}/neutron.conf | ||
68 | sed -e "s:^# core_plugin.*:core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2:g" \ | ||
69 | -i ${NEUTRON_CONF_DIR}/neutron.conf | ||
70 | 63 | ||
71 | # disable reporting of state changes to nova | 64 | # disable reporting of state changes to nova |
72 | sed -e "s:^# notify_nova_on_port_status_changes.*:notify_nova_on_port_status_changes = False:g" \ | 65 | sed -e "s:^# notify_nova_on_port_status_changes.*:notify_nova_on_port_status_changes = False:g" -i ${NEUTRON_CONF_DIR}/neutron.conf |
73 | -i ${NEUTRON_CONF_DIR}/neutron.conf | 66 | sed -e "s:^# notify_nova_on_port_data_changes.*:notify_nova_on_port_data_changes = False:g" -i ${NEUTRON_CONF_DIR}/neutron.conf |
74 | sed -e "s:^# notify_nova_on_port_data_changes.*:notify_nova_on_port_data_changes = False:g" \ | ||
75 | -i ${NEUTRON_CONF_DIR}/neutron.conf | ||
76 | 67 | ||
77 | sed -e "s:^# rabbit_host =.*:rabbit_host = %CONTROLLER_IP%:" -i ${NEUTRON_CONF_DIR}/neutron.conf | 68 | sed -e "s:^# connection = sq.*:connection = postgresql\://${ADMIN_USER}\:${ADMIN_PASSWORD}@localhost/neutron:g" -i ${NEUTRON_CONF_DIR}/neutron.conf |
69 | sed -e "s:^#.*rabbit_host=.*:rabbit_host = %CONTROLLER_IP%:" -i ${NEUTRON_CONF_DIR}/neutron.conf | ||
70 | |||
71 | # ml2_conf.ini changes (replace with .ini file editing) | ||
72 | sed -e "s:^# type_drivers = .*:type_drivers = gre:g" -i ${NEUTRON_CONF_DIR}/plugins/ml2/ml2_conf.ini | ||
73 | sed -e "s:^# tenant_network_types = .*:tenant_network_types = gre:g" -i ${NEUTRON_CONF_DIR}/plugins/ml2/ml2_conf.ini | ||
74 | sed -e "s:^# mechanism_drivers =.*:mechanism_drivers = openvswitch:g" -i ${NEUTRON_CONF_DIR}/plugins/ml2/ml2_conf.ini | ||
75 | sed -e "s:^# tunnel_id_ranges =.*:tunnel_id_ranges = 1\:1000:g" -i ${NEUTRON_CONF_DIR}/plugins/ml2/ml2_conf.ini | ||
76 | |||
77 | echo "[ovs]" >> ${NEUTRON_CONF_DIR}/plugins/ml2/ml2_conf.ini | ||
78 | echo "local_ip = ${MY_IP}" >> ${NEUTRON_CONF_DIR}/plugins/ml2/ml2_conf.ini | ||
79 | echo "tunnel_type = gre" >> ${NEUTRON_CONF_DIR}/plugins/ml2/ml2_conf.ini | ||
80 | echo "enable_tunneling = True" >> ${NEUTRON_CONF_DIR}/plugins/ml2/ml2_conf.ini | ||
78 | 81 | ||
79 | PLUGIN=openvswitch | 82 | PLUGIN=openvswitch |
80 | ARGS="--config-file=${sysconfdir}/${SRCNAME}/neutron.conf --config-file=${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_neutron_plugin.ini" | 83 | ARGS="--config-file=${sysconfdir}/${SRCNAME}/neutron.conf --config-file=${sysconfdir}/${SRCNAME}/plugins/ml2/ml2_conf.ini" |
81 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 84 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
82 | install -d ${D}${sysconfdir}/init.d | 85 | install -d ${D}${sysconfdir}/init.d |
83 | sed "s:@plugin@:/etc/neutron/plugins/$PLUGIN/ovs_neutron_plugin.ini:" \ | 86 | sed "s:@plugin@:/etc/neutron/plugins/ml2/ml2_conf.ini:" \ |
84 | < ${WORKDIR}/neutron-server.init >${WORKDIR}/neutron-server.init.sh | 87 | < ${WORKDIR}/neutron-server.init >${WORKDIR}/neutron-server.init.sh |
85 | install -m 0755 ${WORKDIR}/neutron-server.init.sh ${D}${sysconfdir}/init.d/neutron-server | 88 | install -m 0755 ${WORKDIR}/neutron-server.init.sh ${D}${sysconfdir}/init.d/neutron-server |
86 | sed "s:@suffix@:$PLUGIN:;s:@args@:$ARGS:" < ${WORKDIR}/neutron-agent.init >${WORKDIR}/neutron-$PLUGIN.init.sh | 89 | sed "s:@suffix@:$PLUGIN:;s:@args@:$ARGS:" < ${WORKDIR}/neutron-agent.init >${WORKDIR}/neutron-$PLUGIN.init.sh |
@@ -114,16 +117,11 @@ do_install_append() { | |||
114 | install -m 600 ${WORKDIR}/${AGENT}_agent.ini ${NEUTRON_CONF_DIR}/ | 117 | install -m 600 ${WORKDIR}/${AGENT}_agent.ini ${NEUTRON_CONF_DIR}/ |
115 | fi | 118 | fi |
116 | if [ -z "${OPENSTACKCHEF_ENABLED}" ]; then | 119 | if [ -z "${OPENSTACKCHEF_ENABLED}" ]; then |
117 | for file in plugins/openvswitch/ovs_neutron_plugin.ini \ | 120 | for file in plugins/ml2/ml2_conf.ini neutron.conf metadata_agent.ini; do |
118 | plugins/linuxbridge/linuxbridge_conf.ini neutron.conf metadata_agent.ini; do | 121 | sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" -i ${NEUTRON_CONF_DIR}/$file |
119 | sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ | 122 | sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${NEUTRON_CONF_DIR}/$file |
120 | -i ${NEUTRON_CONF_DIR}/$file | 123 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" -i ${NEUTRON_CONF_DIR}/$file |
121 | sed -e "s:%SERVICE_USER%:${SRCNAME}:g" \ | 124 | sed -e "s:%METADATA_SHARED_SECRET%:${METADATA_SHARED_SECRET}:g" -i ${NEUTRON_CONF_DIR}/$file |
122 | -i ${NEUTRON_CONF_DIR}/$file | ||
123 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ | ||
124 | -i ${NEUTRON_CONF_DIR}/$file | ||
125 | sed -e "s:%METADATA_SHARED_SECRET%:${METADATA_SHARED_SECRET}:g" \ | ||
126 | -i ${NEUTRON_CONF_DIR}/$file | ||
127 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${NEUTRON_CONF_DIR}/$file | 125 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${NEUTRON_CONF_DIR}/$file |
128 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${NEUTRON_CONF_DIR}/$file | 126 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${NEUTRON_CONF_DIR}/$file |
129 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${NEUTRON_CONF_DIR}/$file | 127 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${NEUTRON_CONF_DIR}/$file |
@@ -152,16 +150,15 @@ pkg_postinst_${SRCNAME}-setup () { | |||
152 | sleep 2 | 150 | sleep 2 |
153 | fi | 151 | fi |
154 | 152 | ||
155 | sudo -u postgres createdb ovs_neutron | 153 | sudo -u postgres createdb neutron |
156 | sudo neutron-db-manage --config-file /etc/neutron/neutron.conf \ | 154 | sudo neutron-db-manage --config-file /etc/neutron/neutron.conf \ |
157 | --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini upgrade head | 155 | --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head |
158 | } | 156 | } |
159 | 157 | ||
160 | CHEF_SERVICES_CONF_FILES := " \ | 158 | CHEF_SERVICES_CONF_FILES := " \ |
161 | ${sysconfdir}/${SRCNAME}/neutron.conf \ | 159 | ${sysconfdir}/${SRCNAME}/neutron.conf \ |
162 | ${sysconfdir}/${SRCNAME}/metadata_agent.ini \ | 160 | ${sysconfdir}/${SRCNAME}/metadata_agent.ini \ |
163 | ${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_neutron_plugin.ini \ | 161 | ${sysconfdir}/${SRCNAME}/plugins/ml2/ml2_conf.ini \ |
164 | ${sysconfdir}/${SRCNAME}/plugins/linuxbridge/linuxbridge_conf.ini \ | ||
165 | " | 162 | " |
166 | deploychef_services_special_func(){ | 163 | deploychef_services_special_func(){ |
167 | #This function is a callback function for the deploychef .bbclass | 164 | #This function is a callback function for the deploychef .bbclass |
@@ -194,7 +191,8 @@ PACKAGES += " \ | |||
194 | ${SRCNAME}-doc \ | 191 | ${SRCNAME}-doc \ |
195 | ${SRCNAME}-server \ | 192 | ${SRCNAME}-server \ |
196 | ${SRCNAME}-plugin-openvswitch \ | 193 | ${SRCNAME}-plugin-openvswitch \ |
197 | ${SRCNAME}-plugin-linuxbridge \ | 194 | ${SRCNAME}-plugin-ml2 \ |
195 | ${SRCNAME}-ml2 \ | ||
198 | ${SRCNAME}-dhcp-agent \ | 196 | ${SRCNAME}-dhcp-agent \ |
199 | ${SRCNAME}-l3-agent \ | 197 | ${SRCNAME}-l3-agent \ |
200 | ${SRCNAME}-metadata-agent \ | 198 | ${SRCNAME}-metadata-agent \ |
@@ -223,18 +221,15 @@ FILES_${SRCNAME}-server = "${bindir}/neutron-server \ | |||
223 | ${sysconfdir}/init.d/neutron-server \ | 221 | ${sysconfdir}/init.d/neutron-server \ |
224 | " | 222 | " |
225 | 223 | ||
224 | FILES_${SRCNAME}-plugin-ml2 = " \ | ||
225 | ${sysconfdir}/${SRCNAME}/plugins/ml2/* \ | ||
226 | " | ||
227 | |||
226 | FILES_${SRCNAME}-plugin-openvswitch = " \ | 228 | FILES_${SRCNAME}-plugin-openvswitch = " \ |
227 | ${bindir}/neutron-openvswitch-agent \ | 229 | ${bindir}/neutron-openvswitch-agent \ |
228 | ${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_neutron_plugin.ini \ | ||
229 | ${sysconfdir}/init.d/neutron-openvswitch-agent \ | 230 | ${sysconfdir}/init.d/neutron-openvswitch-agent \ |
230 | " | 231 | " |
231 | 232 | ||
232 | FILES_${SRCNAME}-plugin-linuxbridge = " \ | ||
233 | ${bindir}/neutron-linuxbridge-agent \ | ||
234 | ${sysconfdir}/${SRCNAME}/plugins/linuxbridge/linuxbridge_conf.ini \ | ||
235 | ${sysconfdir}/init.d/neutron-linuxbridge-agent \ | ||
236 | " | ||
237 | |||
238 | FILES_${SRCNAME}-dhcp-agent = "${bindir}/neutron-dhcp-agent \ | 233 | FILES_${SRCNAME}-dhcp-agent = "${bindir}/neutron-dhcp-agent \ |
239 | ${bindir}/neutron-dhcp-agent-dnsmasq-lease-update \ | 234 | ${bindir}/neutron-dhcp-agent-dnsmasq-lease-update \ |
240 | ${sysconfdir}/${SRCNAME}/dhcp_agent.ini \ | 235 | ${sysconfdir}/${SRCNAME}/dhcp_agent.ini \ |
@@ -279,6 +274,7 @@ RDEPENDS_${PN} += "python-paste \ | |||
279 | python-webob \ | 274 | python-webob \ |
280 | python-keystoneclient \ | 275 | python-keystoneclient \ |
281 | python-oslo.config \ | 276 | python-oslo.config \ |
277 | python-oslo.rootwrap \ | ||
282 | python-pyudev \ | 278 | python-pyudev \ |
283 | python-novaclient \ | 279 | python-novaclient \ |
284 | python-mako \ | 280 | python-mako \ |
@@ -291,22 +287,19 @@ RDEPENDS_${SRCNAME} = "${PN} \ | |||
291 | postgresql postgresql-client python-psycopg2" | 287 | postgresql postgresql-client python-psycopg2" |
292 | 288 | ||
293 | RDEPENDS_${SRCNAME}-server = "${SRCNAME}" | 289 | RDEPENDS_${SRCNAME}-server = "${SRCNAME}" |
294 | RDEPENDS_${SRCNAME}-plugin-openvswitch = "${SRCNAME} ${SRCNAME}-plugin-openvswitch-setup openvswitch-switch iproute2" | 290 | RDEPENDS_${SRCNAME}-plugin-openvswitch = "${SRCNAME} ${SRCNAME}-plugin-ml2 ${SRCNAME}-plugin-openvswitch-setup openvswitch-switch iproute2 bridge-utils" |
295 | RDEPENDS_${SRCNAME}-plugin-openvswitch-setup = "openvswitch-switch " | 291 | RDEPENDS_${SRCNAME}-plugin-openvswitch-setup = "openvswitch-switch " |
296 | RDEPENDS_${SRCNAME}-plugin-linuxbridge = "${SRCNAME} bridge-utils" | ||
297 | RDEPENDS_${SRCNAME}-dhcp-agent = "${SRCNAME} dnsmasq dhcp-server dhcp-server-config" | 292 | RDEPENDS_${SRCNAME}-dhcp-agent = "${SRCNAME} dnsmasq dhcp-server dhcp-server-config" |
298 | RDEPENDS_${SRCNAME}-l3-agent = "${SRCNAME} ${SRCNAME}-metadata-agent iputils" | 293 | RDEPENDS_${SRCNAME}-l3-agent = "${SRCNAME} ${SRCNAME}-metadata-agent iputils" |
299 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo" | 294 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo" |
300 | 295 | ||
301 | RRECOMMENDS_${SRCNAME}-server = "${SRCNAME}-plugin-openvswitch" | 296 | RRECOMMENDS_${SRCNAME}-server = "${SRCNAME}-plugin-openvswitch" |
302 | 297 | ||
303 | INITSCRIPT_PACKAGES = "${SRCNAME}-server ${SRCNAME}-plugin-openvswitch ${SRCNAME}-plugin-linuxbridge ${SRCNAME}-dhcp-agent ${SRCNAME}-l3-agent ${SRCNAME}-metadata-agent" | 298 | INITSCRIPT_PACKAGES = "${SRCNAME}-server ${SRCNAME}-plugin-openvswitch ${SRCNAME}-dhcp-agent ${SRCNAME}-l3-agent ${SRCNAME}-metadata-agent" |
304 | INITSCRIPT_NAME_${SRCNAME}-server = "neutron-server" | 299 | INITSCRIPT_NAME_${SRCNAME}-server = "neutron-server" |
305 | INITSCRIPT_PARAMS_${SRCNAME}-server = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 300 | INITSCRIPT_PARAMS_${SRCNAME}-server = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
306 | INITSCRIPT_NAME_${SRCNAME}-plugin-openvswitch = "neutron-openvswitch-agent" | 301 | INITSCRIPT_NAME_${SRCNAME}-plugin-openvswitch = "neutron-openvswitch-agent" |
307 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-openvswitch = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 302 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-openvswitch = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
308 | INITSCRIPT_NAME_${SRCNAME}-plugin-linuxbridge = "neutron-linuxbridge-agent" | ||
309 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-linuxbridge = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | ||
310 | INITSCRIPT_NAME_${SRCNAME}-dhcp-agent = "neutron-dhcp-agent" | 303 | INITSCRIPT_NAME_${SRCNAME}-dhcp-agent = "neutron-dhcp-agent" |
311 | INITSCRIPT_PARAMS_${SRCNAME}-dhcp-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 304 | INITSCRIPT_PARAMS_${SRCNAME}-dhcp-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
312 | INITSCRIPT_NAME_${SRCNAME}-l3-agent = "neutron-l3-agent" | 305 | INITSCRIPT_NAME_${SRCNAME}-l3-agent = "neutron-l3-agent" |