Allow Neutron services to specify config path
An example is I80546b6deefe0878398716d173b7dcc36c3bef3a where the configuration needs to be dropped to /etc/calico. By adapting this task we can allow services to deploy configs to arbitrary paths instead of a statically set /etc/neutron. Change-Id: I8c4c7f513074fbd154ab253182b83227628d44ef
This commit is contained in:
parent
a597bf073d
commit
f9d40a525e
@ -155,6 +155,7 @@ neutron_services:
|
|||||||
group: neutron_dhcp_agent
|
group: neutron_dhcp_agent
|
||||||
service_name: neutron-dhcp-agent
|
service_name: neutron-dhcp-agent
|
||||||
service_en: "{{ neutron_dhcp | bool }}"
|
service_en: "{{ neutron_dhcp | bool }}"
|
||||||
|
service_conf_path: "/etc/neutron"
|
||||||
service_conf: dhcp_agent.ini
|
service_conf: dhcp_agent.ini
|
||||||
service_rootwrap: rootwrap.d/dhcp.filters
|
service_rootwrap: rootwrap.d/dhcp.filters
|
||||||
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --log-file=/var/log/neutron/neutron-dhcp-agent.log
|
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --log-file=/var/log/neutron/neutron-dhcp-agent.log
|
||||||
@ -164,6 +165,7 @@ neutron_services:
|
|||||||
group: neutron_openvswitch_agent
|
group: neutron_openvswitch_agent
|
||||||
service_name: neutron-openvswitch-agent
|
service_name: neutron-openvswitch-agent
|
||||||
service_en: "{{ 'ml2.ovs' in neutron_plugin_type }}"
|
service_en: "{{ 'ml2.ovs' in neutron_plugin_type }}"
|
||||||
|
service_conf_path: "/etc/neutron"
|
||||||
service_conf: plugins/ml2/openvswitch_agent.ini
|
service_conf: plugins/ml2/openvswitch_agent.ini
|
||||||
service_rootwrap: rootwrap.d/openvswitch-plugin.filters
|
service_rootwrap: rootwrap.d/openvswitch-plugin.filters
|
||||||
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --log-file=/var/log/neutron/neutron-openvswitch-agent.log
|
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --log-file=/var/log/neutron/neutron-openvswitch-agent.log
|
||||||
@ -173,6 +175,7 @@ neutron_services:
|
|||||||
group: neutron_linuxbridge_agent
|
group: neutron_linuxbridge_agent
|
||||||
service_name: neutron-linuxbridge-agent
|
service_name: neutron-linuxbridge-agent
|
||||||
service_en: "{{ neutron_plugin_type == 'ml2.lxb' }}"
|
service_en: "{{ neutron_plugin_type == 'ml2.lxb' }}"
|
||||||
|
service_conf_path: "/etc/neutron"
|
||||||
service_conf: plugins/ml2/linuxbridge_agent.ini
|
service_conf: plugins/ml2/linuxbridge_agent.ini
|
||||||
service_rootwrap: rootwrap.d/linuxbridge-plugin.filters
|
service_rootwrap: rootwrap.d/linuxbridge-plugin.filters
|
||||||
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/linuxbridge_agent.ini --log-file=/var/log/neutron/neutron-linuxbridge-agent.log
|
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/linuxbridge_agent.ini --log-file=/var/log/neutron/neutron-linuxbridge-agent.log
|
||||||
@ -182,6 +185,7 @@ neutron_services:
|
|||||||
group: neutron_metadata_agent
|
group: neutron_metadata_agent
|
||||||
service_name: neutron-metadata-agent
|
service_name: neutron-metadata-agent
|
||||||
service_en: "{{ neutron_metadata | bool }}"
|
service_en: "{{ neutron_metadata | bool }}"
|
||||||
|
service_conf_path: "/etc/neutron"
|
||||||
service_conf: metadata_agent.ini
|
service_conf: metadata_agent.ini
|
||||||
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata_agent.ini --log-file=/var/log/neutron/neutron-metadata-agent.log
|
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata_agent.ini --log-file=/var/log/neutron/neutron-metadata-agent.log
|
||||||
config_overrides: "{{ neutron_metadata_agent_ini_overrides }}"
|
config_overrides: "{{ neutron_metadata_agent_ini_overrides }}"
|
||||||
@ -190,6 +194,7 @@ neutron_services:
|
|||||||
group: neutron_metering_agent
|
group: neutron_metering_agent
|
||||||
service_name: neutron-metering-agent
|
service_name: neutron-metering-agent
|
||||||
service_en: "{{ neutron_metering | bool }}"
|
service_en: "{{ neutron_metering | bool }}"
|
||||||
|
service_conf_path: "/etc/neutron"
|
||||||
service_conf: metering_agent.ini
|
service_conf: metering_agent.ini
|
||||||
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metering_agent.ini --log-file=/var/log/neutron/neutron-metering-agent.log
|
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metering_agent.ini --log-file=/var/log/neutron/neutron-metering-agent.log
|
||||||
config_overrides: "{{ neutron_metering_agent_ini_overrides }}"
|
config_overrides: "{{ neutron_metering_agent_ini_overrides }}"
|
||||||
@ -198,6 +203,7 @@ neutron_services:
|
|||||||
group: neutron_l3_agent
|
group: neutron_l3_agent
|
||||||
service_name: neutron-l3-agent
|
service_name: neutron-l3-agent
|
||||||
service_en: "{{ neutron_l3 | bool }}"
|
service_en: "{{ neutron_l3 | bool }}"
|
||||||
|
service_conf_path: "/etc/neutron"
|
||||||
service_conf: l3_agent.ini
|
service_conf: l3_agent.ini
|
||||||
service_rootwrap: rootwrap.d/l3.filters
|
service_rootwrap: rootwrap.d/l3.filters
|
||||||
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --log-file=/var/log/neutron/neutron-l3-agent.log
|
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --log-file=/var/log/neutron/neutron-l3-agent.log
|
||||||
@ -207,6 +213,7 @@ neutron_services:
|
|||||||
group: neutron_lbaasv2_agent
|
group: neutron_lbaasv2_agent
|
||||||
service_name: neutron-lbaasv2-agent
|
service_name: neutron-lbaasv2-agent
|
||||||
service_en: "{{ neutron_lbaasv2 | bool }}"
|
service_en: "{{ neutron_lbaasv2 | bool }}"
|
||||||
|
service_conf_path: "/etc/neutron"
|
||||||
service_conf: lbaas_agent.ini
|
service_conf: lbaas_agent.ini
|
||||||
service_rootwrap: rootwrap.d/lbaas-haproxy.filters
|
service_rootwrap: rootwrap.d/lbaas-haproxy.filters
|
||||||
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/lbaas_agent.ini --log-file=/var/log/neutron/neutron-lbaasv2-agent.log
|
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/lbaas_agent.ini --log-file=/var/log/neutron/neutron-lbaasv2-agent.log
|
||||||
@ -216,6 +223,7 @@ neutron_services:
|
|||||||
group: neutron_l3_agent
|
group: neutron_l3_agent
|
||||||
service_name: neutron-vpn-agent
|
service_name: neutron-vpn-agent
|
||||||
service_en: "{{ neutron_vpnaas | bool }}"
|
service_en: "{{ neutron_vpnaas | bool }}"
|
||||||
|
service_conf_path: "/etc/neutron"
|
||||||
service_conf: vpnaas_agent.ini
|
service_conf: vpnaas_agent.ini
|
||||||
service_rootwrap: rootwrap.d/vpnaas.filters
|
service_rootwrap: rootwrap.d/vpnaas.filters
|
||||||
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/vpnaas_agent.ini --log-file=/var/log/neutron/neutron-vpn-agent.log
|
config_options: --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/vpnaas_agent.ini --log-file=/var/log/neutron/neutron-vpn-agent.log
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- A new variable is supported in the ``neutron_services`` dictionary called
|
||||||
|
``service_conf_path``. This variable enables services to deploy their
|
||||||
|
config templates to paths outside of /etc/neutron by specifying a
|
||||||
|
directory using the new variable.
|
@ -65,7 +65,7 @@
|
|||||||
- name: Generate neutron agent only Config
|
- name: Generate neutron agent only Config
|
||||||
config_template:
|
config_template:
|
||||||
src: "{{ item.value.service_conf }}.j2"
|
src: "{{ item.value.service_conf }}.j2"
|
||||||
dest: "/etc/neutron/{{ item.value.service_conf }}"
|
dest: "{{ item.value.service_conf_path }}/{{ item.value.service_conf }}"
|
||||||
owner: "{{ neutron_system_user_name }}"
|
owner: "{{ neutron_system_user_name }}"
|
||||||
group: "{{ neutron_system_group_name }}"
|
group: "{{ neutron_system_group_name }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
@ -76,6 +76,7 @@
|
|||||||
- Restart neutron services
|
- Restart neutron services
|
||||||
when:
|
when:
|
||||||
- item.value.service_en | bool
|
- item.value.service_en | bool
|
||||||
|
- item.value.service_conf_path is defined
|
||||||
- item.value.service_conf is defined
|
- item.value.service_conf is defined
|
||||||
- item.value.group in group_names
|
- item.value.group in group_names
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user