Partially revert thin neutron containers
Due to a revert in the Docker code, thin neutron containers do not work
at this time. The neutron plugin agents do not need to exist in the same
container as the other agents however. This allows for using either
linuxbridge or openvswitch
The docker commit that did the revert:
ff770d33cd
Closes-Bug: 1469307
Change-Id: Idf79c31c74c34b93f5a9bac49730aca49bbdb861
This commit is contained in:
parent
a48900bc1c
commit
62e02fdbf4
11
compose/neutron-agents.yml
Normal file
11
compose/neutron-agents.yml
Normal file
@ -0,0 +1,11 @@
|
||||
neutronagents:
|
||||
image: kollaglue/centos-rdo-neutron-agents:latest
|
||||
name: neutron-agents
|
||||
net: "host"
|
||||
privileged: true
|
||||
restart: always
|
||||
volumes:
|
||||
- /var/run/netns/:/var/run/netns/
|
||||
- /lib/modules:/lib/modules:ro
|
||||
env_file:
|
||||
- openstack.env
|
@ -1,12 +0,0 @@
|
||||
neutrondhcpagent:
|
||||
image: kollaglue/centos-rdo-neutron-dhcp-agent:latest
|
||||
name: neutron-dhcp-agent
|
||||
net: "host"
|
||||
privileged: true
|
||||
restart: always
|
||||
volumes:
|
||||
- /run/netns/:/run/netns/:ro
|
||||
- /proc/1/ns/:/opt/kolla/host_proc/1/ns/:ro
|
||||
- /lib/modules:/lib/modules:ro
|
||||
env_file:
|
||||
- openstack.env
|
@ -1,12 +0,0 @@
|
||||
neutronl3agent:
|
||||
image: kollaglue/centos-rdo-neutron-l3-agent:latest
|
||||
name: neutron-l3-agent
|
||||
net: "host"
|
||||
privileged: true
|
||||
restart: always
|
||||
volumes:
|
||||
- /run/netns/:/run/netns/:ro
|
||||
- /proc/1/ns/:/opt/kolla/host_proc/1/ns/:ro
|
||||
- /lib/modules:/lib/modules:ro
|
||||
env_file:
|
||||
- openstack.env
|
@ -6,7 +6,6 @@ neutronlinuxbridgeagent:
|
||||
restart: always
|
||||
volumes:
|
||||
- /run/netns/:/run/netns/:ro
|
||||
- /proc/1/ns/:/opt/kolla/host_proc/1/ns/:ro
|
||||
- /lib/modules:/lib/modules:ro
|
||||
env_file:
|
||||
- openstack.env
|
||||
|
@ -1,12 +0,0 @@
|
||||
neutronmetadataagent:
|
||||
image: kollaglue/centos-rdo-neutron-metadata-agent:latest
|
||||
name: neutron-metadata-agent
|
||||
net: "host"
|
||||
privileged: true
|
||||
restart: always
|
||||
volumes:
|
||||
- /run/netns/:/run/netns/:ro
|
||||
- /proc/1/ns/:/opt/kolla/host_proc/1/ns/:ro
|
||||
- /lib/modules:/lib/modules:ro
|
||||
env_file:
|
||||
- openstack.env
|
@ -1,6 +1,16 @@
|
||||
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base:%%KOLLA_TAG%%
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
# Install supervisor
|
||||
RUN easy_install supervisor
|
||||
|
||||
# Install supervisor-stdout
|
||||
RUN pip install supervisor-stdout
|
||||
|
||||
# Configure supervisord
|
||||
RUN mkdir -p /var/log/supervisor/
|
||||
COPY supervisord.conf /etc/
|
||||
|
||||
# TODO: SamYaple FWaaS is part of the l3-agent, not a seperate agent that is
|
||||
# why this file is needed. To support FWaaS we cannot have a seperate container
|
||||
# I need to figure out the best way to make this work together
|
||||
@ -9,6 +19,9 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
# exec line in the start script. Also all these config options can exist in the
|
||||
# main neutron.conf if we wish
|
||||
COPY fwaas_driver.ini /etc/neutron/
|
||||
COPY check.sh start.sh /
|
||||
|
||||
CMD ["/start.sh"]
|
||||
COPY neutron-dhcp-agent/ /opt/kolla/neutron-dhcp-agent
|
||||
COPY neutron-l3-agent/ /opt/kolla/neutron-l3-agent
|
||||
COPY neutron-metadata-agent/ /opt/kolla/neutron-metadata-agent
|
||||
|
||||
CMD ["/usr/bin/supervisord"]
|
@ -0,0 +1 @@
|
||||
../../../../../common/neutron/neutron-dhcp-agent/check.sh
|
@ -0,0 +1 @@
|
||||
../../../../../common/neutron/neutron-dhcp-agent/start.sh
|
@ -0,0 +1 @@
|
||||
../../../../../common/neutron/neutron-l3-agent/check.sh
|
@ -0,0 +1 @@
|
||||
../../../../../common/neutron/neutron-l3-agent/fwaas_driver.ini
|
@ -0,0 +1 @@
|
||||
../../../../../common/neutron/neutron-l3-agent/start.sh
|
@ -0,0 +1 @@
|
||||
../../../../../common/neutron/neutron-metadata-agent/check.sh
|
@ -0,0 +1 @@
|
||||
../../../../../common/neutron/neutron-metadata-agent/start.sh
|
46
docker/centos/binary/neutron/neutron-agents/supervisord.conf
Normal file
46
docker/centos/binary/neutron/neutron-agents/supervisord.conf
Normal file
@ -0,0 +1,46 @@
|
||||
[unix_http_server]
|
||||
file = /var/run/supervisor.sock
|
||||
|
||||
[inet_http_server]
|
||||
port = 127.0.0.1:9001
|
||||
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile = /var/log/supervisor/supervisord.log
|
||||
logfile_maxbytes = 200KB
|
||||
logfile_backups = 1
|
||||
pidfile = /var/run/supervisord.pid
|
||||
childlogdir = /var/log/supervisor
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl = unix:///var/run/supervisor.sock
|
||||
|
||||
[program:neutron-dhcp-agent]
|
||||
command=/opt/kolla/neutron-dhcp-agent/start.sh
|
||||
priority=40
|
||||
startsec=10
|
||||
stderr_events_enabled=true
|
||||
stdout_events_enabled=true
|
||||
|
||||
[program:neutron-metadata-agent]
|
||||
command=/opt/kolla/neutron-metadata-agent/start.sh
|
||||
priority=40
|
||||
startsec=10
|
||||
stderr_events_enabled=true
|
||||
stdout_events_enabled=true
|
||||
|
||||
[program:neutron-l3-agent]
|
||||
command=/opt/kolla/neutron-l3-agent/start.sh
|
||||
priority=40
|
||||
startsec=10
|
||||
stderr_events_enabled=true
|
||||
stdout_events_enabled=true
|
||||
|
||||
[eventlistener:stdout]
|
||||
command = supervisor_stdout
|
||||
buffer_size = 100
|
||||
events = PROCESS_LOG
|
||||
result_handler = supervisor_stdout:event_handler
|
@ -7,12 +7,4 @@ RUN yum -y install openstack-neutron \
|
||||
python-oslo-policy \
|
||||
&& yum clean all
|
||||
|
||||
RUN mkdir -p /opt/kolla/host_proc
|
||||
|
||||
RUN pip install nsenter \
|
||||
&& ln -s 1 /opt/kolla/host_proc/self
|
||||
|
||||
COPY config-neutron.sh config-sudoers.sh /opt/kolla/
|
||||
|
||||
RUN mv /sbin/ip /opt/kolla/ip
|
||||
COPY ip_wrapper.py /sbin/ip
|
||||
|
@ -1,6 +0,0 @@
|
||||
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base:%%KOLLA_TAG%%
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
COPY check.sh start.sh /
|
||||
|
||||
CMD ["/start.sh"]
|
@ -1 +0,0 @@
|
||||
../../../../common/neutron/neutron-dhcp-agent/check.sh
|
@ -1 +0,0 @@
|
||||
../../../../common/neutron/neutron-dhcp-agent/start.sh
|
@ -1 +0,0 @@
|
||||
../../../../../tools/build-docker-image
|
@ -1 +0,0 @@
|
||||
../../../../common/neutron/neutron-l3-agent/check.sh
|
@ -1 +0,0 @@
|
||||
../../../../common/neutron/neutron-l3-agent/start.sh
|
@ -1,6 +0,0 @@
|
||||
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base:%%KOLLA_TAG%%
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
COPY check.sh start.sh /
|
||||
|
||||
CMD ["/start.sh"]
|
@ -1 +0,0 @@
|
||||
../../../../../tools/build-docker-image
|
@ -1 +0,0 @@
|
||||
../../../../common/neutron/neutron-metadata-agent/check.sh
|
@ -1 +0,0 @@
|
||||
../../../../common/neutron/neutron-metadata-agent/start.sh
|
@ -79,5 +79,16 @@ dhcp-option-force=26,1450
|
||||
log-facility=${NEUTRON_LOG_DIR}/neutron-dnsmasq.log
|
||||
EOF
|
||||
|
||||
# TODO: SamYaple remove this section for thin neutron containers
|
||||
# The reason we remove existing namespaces is because network namespaces don't
|
||||
# persist between container restarts because the network proc mountpoint dies
|
||||
# when the container mount namespace dies. The mountpoint in /run/netns does
|
||||
# persist however, and that is all we are cleaning up here.
|
||||
|
||||
# Remove any existing qdhcp namespaces
|
||||
ip netns list | grep qdhcp | while read -r line ; do
|
||||
ip netns delete $line
|
||||
done
|
||||
|
||||
# Start DHCP Agent
|
||||
exec /usr/bin/neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --config-dir /etc/neutron
|
||||
|
@ -76,5 +76,16 @@ elif [ "${USE_NAMESPACES}" == "true" ] ; then
|
||||
"true"
|
||||
fi
|
||||
|
||||
# TODO: SamYaple remove this section for thin neutron containers
|
||||
# The reason we remove existing namespaces is because network namespaces don't
|
||||
# persist between container restarts because the network proc mountpoint dies
|
||||
# when the container mount namespace dies. The mountpoint in /run/netns does
|
||||
# persist however, and that is all we are cleaning up here.
|
||||
|
||||
# Remove any existing qrouter namespaces
|
||||
ip netns list | grep qrouter | while read -r line ; do
|
||||
ip netns delete $line
|
||||
done
|
||||
|
||||
# Start L3 Agent
|
||||
exec /usr/bin/neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/fwaas_driver.ini --config-dir /etc/neutron
|
||||
|
@ -39,10 +39,8 @@ function process_all {
|
||||
# Defaulting to neutron
|
||||
process nova-compute
|
||||
process neutron-server
|
||||
process neutron-dhcp-agent
|
||||
process neutron-l3-agent
|
||||
process neutron-metadata-agent
|
||||
process neutron-linuxbridge-agent
|
||||
process neutron-agents
|
||||
fi
|
||||
process heat-api-engine
|
||||
process magnum-api-conductor
|
||||
|
Loading…
Reference in New Issue
Block a user