diff --git a/docker/services/logging/files/neutron-api.yaml b/docker/services/logging/files/neutron-api.yaml index c0d0ab7660..4a7a058760 100644 --- a/docker/services/logging/files/neutron-api.yaml +++ b/docker/services/logging/files/neutron-api.yaml @@ -7,8 +7,18 @@ parameters: DockerNeutronApiImage: description: image type: string + NeutronServiceName: + description: service name + type: string outputs: + cmd_extra_args: + description: Extra command line arguments for running the service in the container. + value: + str_replace: + template: "--log-file=/var/log/neutron/SERVICE.log" + params: + SERVICE: {get_param: NeutronServiceName} config_settings: description: Extra hieradata needed to log to files in the host. value: null diff --git a/docker/services/logging/files/neutron-common.yaml b/docker/services/logging/files/neutron-common.yaml index 17a70f1af7..077d991037 100644 --- a/docker/services/logging/files/neutron-common.yaml +++ b/docker/services/logging/files/neutron-common.yaml @@ -3,7 +3,19 @@ heat_template_version: queens description: > OpenStack containerized Neutron service +parameters: + NeutronServiceName: + description: service name + type: string + outputs: + cmd_extra_args: + description: Extra command line arguments for running the service in the container. + value: + str_replace: + template: "--log-file=/var/log/neutron/SERVICE.log" + params: + SERVICE: {get_param: NeutronServiceName} config_settings: description: Extra hieradata needed to log to files in the host. value: null diff --git a/docker/services/logging/stdout/neutron-common.yaml b/docker/services/logging/stdout/neutron-common.yaml index ce26262a5d..c4fa8e1a90 100644 --- a/docker/services/logging/stdout/neutron-common.yaml +++ b/docker/services/logging/stdout/neutron-common.yaml @@ -3,7 +3,15 @@ heat_template_version: queens description: > OpenStack containerized Neutron API service +parameters: + NeutronServiceName: + description: service name + type: string + outputs: + cmd_extra_args: + description: Extra command line arguments for running the service in the container. + value: "--log-file=" config_settings: description: Extra hieradata needed to log to stdout. value: diff --git a/docker/services/neutron-api.yaml b/docker/services/neutron-api.yaml index 9507e27d53..1d6c461ed5 100644 --- a/docker/services/neutron-api.yaml +++ b/docker/services/neutron-api.yaml @@ -76,6 +76,8 @@ resources: NeutronLogging: type: OS::TripleO::Services::Logging::NeutronApi + properties: + NeutronServiceName: server outputs: role_data: @@ -101,7 +103,11 @@ outputs: config_image: {get_param: DockerNeutronConfigImage} kolla_config: /var/lib/kolla/config_files/neutron_api.json: - command: /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/neutron/server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-server + command: + list_join: + - ' ' + - - /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/neutron/server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-server + - get_attr: [NeutronLogging, cmd_extra_args] config_files: - source: "/var/lib/kolla/config_files/src/*" dest: "/" diff --git a/docker/services/neutron-dhcp.yaml b/docker/services/neutron-dhcp.yaml index 62ac9d5e67..6407100f4b 100644 --- a/docker/services/neutron-dhcp.yaml +++ b/docker/services/neutron-dhcp.yaml @@ -66,6 +66,8 @@ resources: NeutronLogging: type: OS::TripleO::Services::Logging::NeutronCommon + properties: + NeutronServiceName: dhcp-agent outputs: role_data: @@ -92,7 +94,11 @@ outputs: config_image: {get_param: DockerNeutronConfigImage} kolla_config: /var/lib/kolla/config_files/neutron_dhcp.json: - command: /usr/bin/neutron-dhcp-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-dhcp-agent + command: + list_join: + - ' ' + - - /usr/bin/neutron-dhcp-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-dhcp-agent + - get_attr: [NeutronLogging, cmd_extra_args] config_files: - source: "/var/lib/kolla/config_files/src/*" dest: "/" diff --git a/docker/services/neutron-l3.yaml b/docker/services/neutron-l3.yaml index 393bfa972e..21afb71120 100644 --- a/docker/services/neutron-l3.yaml +++ b/docker/services/neutron-l3.yaml @@ -54,6 +54,8 @@ resources: NeutronLogging: type: OS::TripleO::Services::Logging::NeutronCommon + properties: + NeutronServiceName: l3-agent outputs: role_data: @@ -74,7 +76,11 @@ outputs: config_image: {get_param: DockerNeutronConfigImage} kolla_config: /var/lib/kolla/config_files/neutron_l3_agent.json: - command: /usr/bin/neutron-l3-agent --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/neutron/l3_agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-l3-agent + command: + list_join: + - ' ' + - - /usr/bin/neutron-l3-agent --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/neutron/l3_agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-l3-agent + - get_attr: [NeutronLogging, cmd_extra_args] config_files: - source: "/var/lib/kolla/config_files/src/*" dest: "/" diff --git a/docker/services/neutron-metadata.yaml b/docker/services/neutron-metadata.yaml index 3ae11f3b44..1cde3eb40f 100644 --- a/docker/services/neutron-metadata.yaml +++ b/docker/services/neutron-metadata.yaml @@ -54,6 +54,8 @@ resources: NeutronLogging: type: OS::TripleO::Services::Logging::NeutronCommon + properties: + NeutronServiceName: metadata-agent outputs: role_data: @@ -74,7 +76,11 @@ outputs: config_image: {get_param: DockerNeutronConfigImage} kolla_config: /var/lib/kolla/config_files/neutron_metadata_agent.json: - command: /usr/bin/neutron-metadata-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-metadata-agent + command: + list_join: + - ' ' + - - /usr/bin/neutron-metadata-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-metadata-agent + - get_attr: [NeutronLogging, cmd_extra_args] config_files: - source: "/var/lib/kolla/config_files/src/*" dest: "/" diff --git a/docker/services/neutron-ovs-agent.yaml b/docker/services/neutron-ovs-agent.yaml index 3012e2ff4c..9e2003b549 100644 --- a/docker/services/neutron-ovs-agent.yaml +++ b/docker/services/neutron-ovs-agent.yaml @@ -58,6 +58,8 @@ resources: NeutronLogging: type: OS::TripleO::Services::Logging::NeutronCommon + properties: + NeutronServiceName: openvswitch-agent outputs: role_data: @@ -86,7 +88,11 @@ outputs: - /run/openvswitch:/run/openvswitch kolla_config: /var/lib/kolla/config_files/neutron_ovs_agent.json: - command: /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-dir /etc/neutron/conf.d/common + command: + list_join: + - ' ' + - - /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-dir /etc/neutron/conf.d/common + - get_attr: [NeutronLogging, cmd_extra_args] config_files: - source: "/var/lib/kolla/config_files/src/*" dest: "/" diff --git a/docker/services/neutron-sriov-agent.yaml b/docker/services/neutron-sriov-agent.yaml index 5b6c69e4c1..4c566bfc66 100644 --- a/docker/services/neutron-sriov-agent.yaml +++ b/docker/services/neutron-sriov-agent.yaml @@ -54,6 +54,8 @@ resources: NeutronLogging: type: OS::TripleO::Services::Logging::NeutronCommon + properties: + NeutronServiceName: sriov-nic-agent outputs: role_data: @@ -72,7 +74,11 @@ outputs: config_image: {get_param: DockerNeutronConfigImage} kolla_config: /var/lib/kolla/config_files/neutron_sriov_agent.json: - command: /usr/bin/neutron-sriov-nic-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/sriov_agent.ini --config-dir /etc/neutron/conf.d/common + command: + list_join: + - ' ' + - - /usr/bin/neutron-sriov-nic-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/sriov_agent.ini --config-dir /etc/neutron/conf.d/common + - get_attr: [NeutronLogging, cmd_extra_args] config_files: - source: "/var/lib/kolla/config_files/src/*" dest: "/" diff --git a/docker/services/ovn-metadata.yaml b/docker/services/ovn-metadata.yaml index 7dd4aa6dd9..e0c2d77f6f 100644 --- a/docker/services/ovn-metadata.yaml +++ b/docker/services/ovn-metadata.yaml @@ -54,6 +54,8 @@ resources: NeutronLogging: type: OS::TripleO::Services::Logging::NeutronCommon + properties: + NeutronServiceName: ovn-metadata-agent outputs: role_data: @@ -77,7 +79,11 @@ outputs: - /run/openvswitch:/run/openvswitch kolla_config: /var/lib/kolla/config_files/ovn_metadata_agent.json: - command: /usr/bin/networking-ovn-metadata-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/networking-ovn/networking-ovn-metadata-agent.ini --config-dir /etc/neutron/conf.d/networking-ovn-metadata-agent + command: + list_join: + - ' ' + - - /usr/bin/networking-ovn-metadata-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/networking-ovn/networking-ovn-metadata-agent.ini --config-dir /etc/neutron/conf.d/networking-ovn-metadata-agent + - get_attr: [NeutronLogging, cmd_extra_args] config_files: - source: "/var/lib/kolla/config_files/src/*" dest: "/"