How to change Openstack Kolla/Kolla-ansible container dumb-init command

asked 2020-03-30 08:09:04 -0500

zero gravatar image

I try to use Kolla and Kolla-ansible to build up my Rocky version Openstack allinone environment, everything goes well until I try to boot up (kolla-ansible xxx deploy) my test agent in the neutron-lbaas-agent container.

I replaced the neutron-lbaas-agent as test-agent, and I use kolla to build my test image. I use the neutron-lbaas-agent container and installed some of my test code and a startup script test-agent when the image is building.

I also changed the script in kolla-ansible/ansible/roles/neutron/templates/neutron-lbaas-agent.json.j2 file to something like below:

{ "command": "test-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/services/test/test-openstack-agent.ini", "config_files": [ { "source": "{{ container_config_directory }}/neutron.conf", "dest": "/etc/neutron/neutron.conf", "owner": "neutron", "perm": "0600" }, { "source": "{{ container_config_directory }}/neutron_lbaas.conf", "dest": "/etc/neutron/neutron_lbaas.conf", "owner": "neutron", "perm": "0600" }, { "source": "{{ container_config_directory }}/services/test/test-openstack-agent.ini", "dest": "/etc/neutron/services/test/test-openstack-agent.ini", "owner": "neutron", "perm": "0600", "optional": true } ], "permissions": [ { "path": "/var/log/kolla/neutron", "owner": "neutron:neutron", "recurse": true }, { "path": "/var/lib/neutron/kolla", "owner": "neutron:neutron", "recurse": true } ] }

I thought the dumb-int of neutron-lbaas-agent container will use this json file to startup the test-agent.

However, after I ran kolla-ansible XXXX deploy, I find the neutron-lbaas-agent status is Restarting.

I checkout the logs:

2020-03-30 01:47:36.746 6 DEBUG neutron.common.config [-] command line: /var/lib/kolla/venv/bin/neutron-lbaasv2-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/lbaas_agent.ini --config-file /etc/neutron/neutron_lb 2020-03-30 01:47:36.746 6 WARNING neutron_lbaas.agent.agent [-] neutron-lbaas is now deprecated. See: https://wiki.openstack.org/wiki/Neutron/LBaaS/Deprecation 2020-03-30 01:47:36.747 6 CRITICAL neutron [req-4281a5c9-5bd7-4251-b803-52d51114cd8b - - - - -] Unhandled error: AssertionError: 'TRANSPORT' must not be None

It seems the container still uses the original neutron-lbaasv2-agent script to startup the service.

My questions are:

  1. Is there any way to change the container to use my test-agent script to startup the services?

  2. which layer of the image is related to dumb-init built/configured? since I have not found any configuration options in Kolla to configure service-related dumb-init script.

Anyone could help, thanks very much.

edit retag flag offensive close merge delete