diff options
| author | Mark Asselstine <mark.asselstine@windriver.com> | 2014-03-22 23:20:07 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-04-15 19:48:37 -0400 |
| commit | 1768e94b9e600884d43e65b3ef05e379f043a196 (patch) | |
| tree | bda7de8ecbefad7244f7b27dc0bb88354bea40be /meta-openstack/recipes-devtools/python | |
| parent | 8e8d5d43698b24af551a8c2c3b766cf545a7d340 (diff) | |
| download | meta-cloud-services-1768e94b9e600884d43e65b3ef05e379f043a196.tar.gz | |
python-neutron: get the l3-agent properly packaged
The recipe had the initial groundwork established to create the
l3-agent package but some aspects were incomplete. Add the necessary
.ini file and create the initscript necessary to launch the l3-agent
at boot time.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
3 files changed, 82 insertions, 4 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-neutron/l3_agent.ini b/meta-openstack/recipes-devtools/python/python-neutron/l3_agent.ini new file mode 100644 index 0000000..1310c7e --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-neutron/l3_agent.ini | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | [DEFAULT] | ||
| 2 | # Show debugging output in log (sets DEBUG log level output) | ||
| 3 | # debug = False | ||
| 4 | |||
| 5 | # L3 requires that an interface driver be set. Choose the one that best | ||
| 6 | # matches your plugin. | ||
| 7 | # interface_driver = | ||
| 8 | |||
| 9 | # Example of interface_driver option for OVS based plugins (OVS, Ryu, NEC) | ||
| 10 | # that supports L3 agent | ||
| 11 | interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver | ||
| 12 | |||
| 13 | # Use veth for an OVS interface or not. | ||
| 14 | # Support kernels with limited namespace support | ||
| 15 | # (e.g. RHEL 6.5) so long as ovs_use_veth is set to True. | ||
| 16 | # ovs_use_veth = False | ||
| 17 | |||
| 18 | # Example of interface_driver option for LinuxBridge | ||
| 19 | # interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver | ||
| 20 | |||
| 21 | # Allow overlapping IP (Must have kernel build with CONFIG_NET_NS=y and | ||
| 22 | # iproute2 package that supports namespaces). | ||
| 23 | # use_namespaces = True | ||
| 24 | |||
| 25 | # If use_namespaces is set as False then the agent can only configure one router. | ||
| 26 | |||
| 27 | # This is done by setting the specific router_id. | ||
| 28 | # router_id = | ||
| 29 | |||
| 30 | # Each L3 agent can be associated with at most one external network. This | ||
| 31 | # value should be set to the UUID of that external network. If empty, | ||
| 32 | # the agent will enforce that only a single external networks exists and | ||
| 33 | # use that external network id | ||
| 34 | # gateway_external_network_id = | ||
| 35 | |||
| 36 | # Indicates that this L3 agent should also handle routers that do not have | ||
| 37 | # an external network gateway configured. This option should be True only | ||
| 38 | # for a single agent in a Neutron deployment, and may be False for all agents | ||
| 39 | # if all routers must have an external network gateway | ||
| 40 | # handle_internal_only_routers = True | ||
| 41 | |||
| 42 | # Name of bridge used for external network traffic. This should be set to | ||
| 43 | # empty value for the linux bridge | ||
| 44 | # external_network_bridge = br-ex | ||
| 45 | |||
| 46 | # TCP Port used by Neutron metadata server | ||
| 47 | # metadata_port = 9697 | ||
| 48 | |||
| 49 | # Send this many gratuitous ARPs for HA setup. Set it below or equal to 0 | ||
| 50 | # to disable this feature. | ||
| 51 | # send_arp_for_ha = 3 | ||
| 52 | |||
| 53 | # seconds between re-sync routers' data if needed | ||
| 54 | # periodic_interval = 40 | ||
| 55 | |||
| 56 | # seconds to start to sync routers' data after | ||
| 57 | # starting agent | ||
| 58 | # periodic_fuzzy_delay = 5 | ||
| 59 | |||
| 60 | # enable_metadata_proxy, which is true by default, can be set to False | ||
| 61 | # if the Nova metadata server is not available | ||
| 62 | # enable_metadata_proxy = True | ||
| 63 | |||
| 64 | # Location of Metadata Proxy UNIX domain socket | ||
| 65 | # metadata_proxy_socket = $state_path/metadata_proxy | ||
diff --git a/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init b/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init index 01cb27e..8bd4c23 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init +++ b/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init | |||
| @@ -12,6 +12,7 @@ SUFFIX=@suffix@ | |||
| 12 | DESC="neutron-$SUFFIX-agent" | 12 | DESC="neutron-$SUFFIX-agent" |
| 13 | DAEMON="/usr/bin/neutron-$SUFFIX-agent" | 13 | DAEMON="/usr/bin/neutron-$SUFFIX-agent" |
| 14 | PIDFILE="/var/run/neutron-$SUFFIX-agent.pid" | 14 | PIDFILE="/var/run/neutron-$SUFFIX-agent.pid" |
| 15 | DAEMON_ARGS="@args@" | ||
| 15 | 16 | ||
| 16 | start() | 17 | start() |
| 17 | { | 18 | { |
| @@ -34,7 +35,7 @@ start() | |||
| 34 | 35 | ||
| 35 | start-stop-daemon --start --quiet --background \ | 36 | start-stop-daemon --start --quiet --background \ |
| 36 | --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON} \ | 37 | --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON} \ |
| 37 | -- --log-dir=/var/log/neutron | 38 | -- ${DAEMON_ARGS} --log-dir=/var/log/neutron |
| 38 | 39 | ||
| 39 | if [ $? -eq 0 ]; then | 40 | if [ $? -eq 0 ]; then |
| 40 | echo "done." | 41 | echo "done." |
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb index fcb8b4d..b256c79 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb +++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb | |||
| @@ -12,6 +12,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ | |||
| 12 | file://linuxbridge_conf.ini \ | 12 | file://linuxbridge_conf.ini \ |
| 13 | file://neutron-server.init \ | 13 | file://neutron-server.init \ |
| 14 | file://neutron-agent.init \ | 14 | file://neutron-agent.init \ |
| 15 | file://l3_agent.ini \ | ||
| 15 | " | 16 | " |
| 16 | SRCREV="8cb9d895675f2a89c6b741da4b594f416fbeee5a" | 17 | SRCREV="8cb9d895675f2a89c6b741da4b594f416fbeee5a" |
| 17 | PV="2013.2.2+git${SRCPV}" | 18 | PV="2013.2.2+git${SRCPV}" |
| @@ -53,15 +54,24 @@ do_install_append() { | |||
| 53 | install -m 600 ${S}/etc/policy.json ${NEUTRON_CONF_DIR}/ | 54 | install -m 600 ${S}/etc/policy.json ${NEUTRON_CONF_DIR}/ |
| 54 | 55 | ||
| 55 | PLUGIN=openvswitch | 56 | PLUGIN=openvswitch |
| 57 | ARGS="" | ||
| 56 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 58 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 57 | install -d ${D}${sysconfdir}/init.d | 59 | install -d ${D}${sysconfdir}/init.d |
| 58 | sed "s:@plugin@:/etc/neutron/plugins/$PLUGIN/ovs_neutron_plugin.ini:" \ | 60 | sed "s:@plugin@:/etc/neutron/plugins/$PLUGIN/ovs_neutron_plugin.ini:" \ |
| 59 | < ${WORKDIR}/neutron-server.init >${WORKDIR}/neutron-server.init.sh | 61 | < ${WORKDIR}/neutron-server.init >${WORKDIR}/neutron-server.init.sh |
| 60 | install -m 0755 ${WORKDIR}/neutron-server.init.sh ${D}${sysconfdir}/init.d/neutron-server | 62 | install -m 0755 ${WORKDIR}/neutron-server.init.sh ${D}${sysconfdir}/init.d/neutron-server |
| 61 | sed "s:@suffix@:$PLUGIN:" < ${WORKDIR}/neutron-agent.init >${WORKDIR}/neutron-$PLUGIN.init.sh | 63 | sed "s:@suffix@:$PLUGIN:;s:@args@:$ARGS:" < ${WORKDIR}/neutron-agent.init >${WORKDIR}/neutron-$PLUGIN.init.sh |
| 62 | install -m 0755 ${WORKDIR}/neutron-$PLUGIN.init.sh ${D}${sysconfdir}/init.d/neutron-$PLUGIN-agent | 64 | install -m 0755 ${WORKDIR}/neutron-$PLUGIN.init.sh ${D}${sysconfdir}/init.d/neutron-$PLUGIN-agent |
| 63 | fi | 65 | fi |
| 64 | 66 | ||
| 67 | AGENT=l3 | ||
| 68 | ARGS="--config-file=${sysconfdir}/${SRCNAME}/neutron.conf --config-file=${sysconfdir}/${SRCNAME}/l3_agent.ini" | ||
| 69 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
| 70 | sed "s:@suffix@:$AGENT:;s:@args@:$ARGS:" < ${WORKDIR}/neutron-agent.init >${WORKDIR}/neutron-$AGENT.init.sh | ||
| 71 | install -m 0755 ${WORKDIR}/neutron-$AGENT.init.sh ${D}${sysconfdir}/init.d/neutron-$AGENT-agent | ||
| 72 | install -m 600 ${WORKDIR}/${AGENT}_agent.ini ${NEUTRON_CONF_DIR}/ | ||
| 73 | fi | ||
| 74 | |||
| 65 | cp run_tests.sh ${NEUTRON_CONF_DIR} | 75 | cp run_tests.sh ${NEUTRON_CONF_DIR} |
| 66 | } | 76 | } |
| 67 | 77 | ||
| @@ -147,7 +157,7 @@ FILES_${SRCNAME}-dhcp-agent = "${bindir}/neutron-dhcp-agent \ | |||
| 147 | 157 | ||
| 148 | FILES_${SRCNAME}-l3-agent = "${bindir}/neutron-l3-agent \ | 158 | FILES_${SRCNAME}-l3-agent = "${bindir}/neutron-l3-agent \ |
| 149 | ${sysconfdir}/${SRCNAME}/l3_agent.ini \ | 159 | ${sysconfdir}/${SRCNAME}/l3_agent.ini \ |
| 150 | ${sysconfdir}/init.d/l3_agent \ | 160 | ${sysconfdir}/init.d/neutron-l3-agent \ |
| 151 | " | 161 | " |
| 152 | 162 | ||
| 153 | FILES_${SRCNAME}-metadata-agent = "${bindir}/neutron-metadata-agent \ | 163 | FILES_${SRCNAME}-metadata-agent = "${bindir}/neutron-metadata-agent \ |
| @@ -202,10 +212,12 @@ RDEPENDS_${SRCNAME}-setup = "postgresql sudo" | |||
| 202 | 212 | ||
| 203 | RRECOMMENDS_${SRCNAME}-server = "${SRCNAME}-plugin-openvswitch" | 213 | RRECOMMENDS_${SRCNAME}-server = "${SRCNAME}-plugin-openvswitch" |
| 204 | 214 | ||
| 205 | INITSCRIPT_PACKAGES = "${SRCNAME}-server ${SRCNAME}-plugin-openvswitch ${SRCNAME}-plugin-linuxbridge" | 215 | INITSCRIPT_PACKAGES = "${SRCNAME}-server ${SRCNAME}-plugin-openvswitch ${SRCNAME}-plugin-linuxbridge ${SRCNAME}-l3-agent" |
| 206 | INITSCRIPT_NAME_${SRCNAME}-server = "neutron-server" | 216 | INITSCRIPT_NAME_${SRCNAME}-server = "neutron-server" |
| 207 | INITSCRIPT_PARAMS_${SRCNAME}-server = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 217 | INITSCRIPT_PARAMS_${SRCNAME}-server = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
| 208 | INITSCRIPT_NAME_${SRCNAME}-plugin-openvswitch = "neutron-openvswitch-agent" | 218 | INITSCRIPT_NAME_${SRCNAME}-plugin-openvswitch = "neutron-openvswitch-agent" |
| 209 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-openvswitch = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 219 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-openvswitch = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
| 210 | INITSCRIPT_NAME_${SRCNAME}-plugin-linuxbridge = "neutron-linuxbridge-agent" | 220 | INITSCRIPT_NAME_${SRCNAME}-plugin-linuxbridge = "neutron-linuxbridge-agent" |
| 211 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-linuxbridge = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 221 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-linuxbridge = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
| 222 | INITSCRIPT_NAME_${SRCNAME}-l3-agent = "neutron-l3-agent" | ||
| 223 | INITSCRIPT_PARAMS_${SRCNAME}-l3-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | ||
