From aa2607f85c395a134080a59e573c9843f7d69397 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 19 Jul 2019 20:49:38 +0300 Subject: [PATCH] Drop creation of log directories This patch finalizes migration to journald with cleanup of unnecesary tasks, like mapping log directories or launching rsyslog_client role. Depends-On: https://review.opendev.org/672059 Depends-On: https://review.opendev.org/672506 Change-Id: Ib7f2fde163a3d3b965a61fee1dd456a186b84e23 --- inventory/group_vars/neutron_agent.yml | 1 - playbooks/ceph-install.yml | 2 ++ playbooks/ceph-rgw-install.yml | 5 +++ playbooks/common-playbooks/cinder.yml | 13 ------- playbooks/common-playbooks/glance.yml | 13 ------- playbooks/common-playbooks/neutron.yml | 34 ------------------- playbooks/common-playbooks/nova.yml | 13 ------- playbooks/common-tasks/ceph-server.yml | 6 ---- playbooks/defaults/ceph_ansible.yml | 23 +++++++++++++ playbooks/galera-install.yml | 16 --------- playbooks/haproxy-install.yml | 19 ----------- playbooks/memcached-install.yml | 13 ------- playbooks/os-aodh-install.yml | 13 ------- playbooks/os-barbican-install.yml | 13 ------- playbooks/os-blazar-install.yml | 14 -------- playbooks/os-ceilometer-install.yml | 12 ------- playbooks/os-congress-install.yml | 14 -------- playbooks/os-designate-install.yml | 13 ------- playbooks/os-gnocchi-install.yml | 13 ------- playbooks/os-heat-install.yml | 13 ------- playbooks/os-horizon-install.yml | 13 ------- playbooks/os-ironic-install.yml | 7 ---- playbooks/os-keystone-install.yml | 13 ------- playbooks/os-magnum-install.yml | 13 ------- playbooks/os-manila-install.yml | 13 ------- playbooks/os-masakari-install.yml | 10 ------ playbooks/os-mistral-install.yml | 14 -------- playbooks/os-octavia-install.yml | 13 ------- playbooks/os-panko-install.yml | 13 ------- playbooks/os-placement-install.yml | 14 -------- playbooks/os-sahara-install.yml | 13 ------- playbooks/os-swift-install.yml | 15 -------- playbooks/os-tacker-install.yml | 13 ------- playbooks/os-trove-install.yml | 13 ------- .../use_journalctl-a9a19f80b14f4f87.yaml | 11 ++++++ scripts/log-collect.sh | 2 +- 36 files changed, 42 insertions(+), 411 deletions(-) create mode 100644 playbooks/defaults/ceph_ansible.yml create mode 100644 releasenotes/notes/use_journalctl-a9a19f80b14f4f87.yaml diff --git a/inventory/group_vars/neutron_agent.yml b/inventory/group_vars/neutron_agent.yml index c58127c98b..99ec6752eb 100644 --- a/inventory/group_vars/neutron_agent.yml +++ b/inventory/group_vars/neutron_agent.yml @@ -19,7 +19,6 @@ # neutron DHCP. neutron_dhcp_config: dhcp-ignore: "tag:!known" - log-facility: "/var/log/neutron/neutron-dnsmasq.log" lxc_container_config_list: - "lxc.aa_profile=unconfined" diff --git a/playbooks/ceph-install.yml b/playbooks/ceph-install.yml index 468238a992..23a9ec42a8 100644 --- a/playbooks/ceph-install.yml +++ b/playbooks/ceph-install.yml @@ -18,6 +18,7 @@ user: root vars_files: - "defaults/{{ install_method }}_install.yml" + - "defaults/ceph_ansible.yml" pre_tasks: - import_tasks: common-tasks/ceph-server.yml @@ -99,6 +100,7 @@ user: root vars_files: - "defaults/{{ install_method }}_install.yml" + - "defaults/ceph_ansible.yml" pre_tasks: - import_tasks: common-tasks/ceph-server.yml diff --git a/playbooks/ceph-rgw-install.yml b/playbooks/ceph-rgw-install.yml index 79cff15c53..34602f4bc1 100644 --- a/playbooks/ceph-rgw-install.yml +++ b/playbooks/ceph-rgw-install.yml @@ -22,6 +22,11 @@ vars_files: - "defaults/{{ install_method }}_install.yml" pre_tasks: + - import_tasks: common-tasks/os-log-dir-setup.yml + vars: + log_dirs: + - src: "/openstack/log/{{ inventory_hostname }}-ceph" + dest: "/var/log/ceph" - import_tasks: common-tasks/ceph-server.yml diff --git a/playbooks/common-playbooks/cinder.yml b/playbooks/common-playbooks/cinder.yml index 30dfa4001b..13964c50a7 100644 --- a/playbooks/common-playbooks/cinder.yml +++ b/playbooks/common-playbooks/cinder.yml @@ -63,13 +63,6 @@ - "not is_metal" - "not ( 'cinder_volume' in group_names and cinder_backend_lvm_inuse | bool )" - - name: Configure log directories (on metal) - include_tasks: ../common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-cinder" - dest: "/var/log/cinder" - - include_tasks: ../common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -106,12 +99,6 @@ - crontab post_tasks: - - include_tasks: "../common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: cinder_log_rotate - rsyslog_client_log_dir: "/var/log/cinder" - rsyslog_client_config_name: "99-cinder-rsyslog-client.conf" - # Now that container changes are done, we can set # the load balancer back end for this container # to available again. diff --git a/playbooks/common-playbooks/glance.yml b/playbooks/common-playbooks/glance.yml index 924786fdcd..cc9da42f8a 100644 --- a/playbooks/common-playbooks/glance.yml +++ b/playbooks/common-playbooks/glance.yml @@ -52,13 +52,6 @@ - not is_metal - (glance_default_store != "file") or (glance_nfs_client is defined) - - name: Configure log directories (on metal) - include_tasks: ../common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-glance" - dest: "/var/log/glance" - - include_tasks: ../common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -70,12 +63,6 @@ - crontab post_tasks: - - include_tasks: "../common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: glance_log_rotate - rsyslog_client_log_dir: "/var/log/glance" - rsyslog_client_config_name: "99-glance-rsyslog-client.conf" - # Now that container changes are done, we can set # the load balancer back end for this container # to available again. diff --git a/playbooks/common-playbooks/neutron.yml b/playbooks/common-playbooks/neutron.yml index 4d90002ad0..807491f955 100644 --- a/playbooks/common-playbooks/neutron.yml +++ b/playbooks/common-playbooks/neutron.yml @@ -51,22 +51,6 @@ - "not is_metal" - "'neutron_agent' not in group_names" - - name: Configure log directories (on metal) - include_tasks: ../common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-neutron" - dest: "/var/log/neutron" - - - name: Configure log directories (on metal) (calico) - include_tasks: ../common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-calico" - dest: "/var/log/calico" - when: - - "'neutron_calico_dhcp_agent' in group_names" - - include_tasks: ../common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -103,21 +87,3 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "../common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: neutron_log_rotate - rsyslog_client_log_dir: "/var/log/neutron" - rsyslog_client_log_files: - - /var/log/conntrackd.log - - /var/log/conntrackd-stats.log - rsyslog_client_config_name: "99-neutron-rsyslog-client.conf" - - - include_tasks: "../common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: calico_log_rotate - rsyslog_client_log_dir: "/var/log/calico" - rsyslog_client_config_name: "99-calico-rsyslog-client.conf" - when: - - "'neutron_calico_dhcp_agent' in group_names" diff --git a/playbooks/common-playbooks/nova.yml b/playbooks/common-playbooks/nova.yml index fd6bf6d4da..9617033712 100644 --- a/playbooks/common-playbooks/nova.yml +++ b/playbooks/common-playbooks/nova.yml @@ -72,13 +72,6 @@ extra_container_config_no_restart: - "lxc.start.order=39" - - name: Configure log directories (on metal) - include_tasks: ../common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-nova" - dest: "/var/log/nova" - - include_tasks: ../common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -149,12 +142,6 @@ - crontab post_tasks: - - include_tasks: "../common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: nova_log_rotate - rsyslog_client_log_dir: "/var/log/nova" - rsyslog_client_config_name: "99-nova-rsyslog-client.conf" - # Now that container changes are done, we can set # the load balancer back end for this container # to available again. diff --git a/playbooks/common-tasks/ceph-server.yml b/playbooks/common-tasks/ceph-server.yml index d699cbf994..afd27dc3ff 100644 --- a/playbooks/common-tasks/ceph-server.yml +++ b/playbooks/common-tasks/ceph-server.yml @@ -13,12 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- import_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-ceph" - dest: "/var/log/ceph" - - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal vars: diff --git a/playbooks/defaults/ceph_ansible.yml b/playbooks/defaults/ceph_ansible.yml new file mode 100644 index 0000000000..bf0b316ab2 --- /dev/null +++ b/playbooks/defaults/ceph_ansible.yml @@ -0,0 +1,23 @@ +--- +# Copyright 2019, VEXXHOST, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ceph_conf_overrides: + global: + log_file: none + log_to_syslog: true + err_to_syslog: true + mon: + mon_cluster_log_to_syslog: true + mon_cluster_log_file: none diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index 9f03f83d2c..e269da1ca9 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -19,11 +19,6 @@ serial: 1 user: root tasks: - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-mysql_logs" - dest: "/var/log/mysql_logs" - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal vars: @@ -53,17 +48,6 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: galera_log_rotate - rsyslog_client_log_dir: "/var/log/mysql_logs" - rsyslog_client_log_files: - - /var/log/mysql.log - - /var/log/mysql.err - rsyslog_client_config_name: "99-galera-rsyslog-client.conf" - vars: galera_server_id: "{{ inventory_hostname | string_2_int }}" galera_wsrep_node_name: "{{ container_name | default(inventory_hostname) }}" diff --git a/playbooks/haproxy-install.yml b/playbooks/haproxy-install.yml index 4871bfd976..f8230c9696 100644 --- a/playbooks/haproxy-install.yml +++ b/playbooks/haproxy-install.yml @@ -21,11 +21,6 @@ pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-haproxy" - dest: "/var/log/haproxy" - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -42,12 +37,6 @@ - "item.when | bool" tags: - haproxy-config # this tag is present because the task is ONLY a config task - - name: Remove legacy haproxy logging file - file: - dest: "/etc/rsyslog.d/haproxy.conf" - state: "absent" - tags: - - haproxy-config # this tag is present because the task is ONLY a config task roles: - role: "keepalived" when: haproxy_use_keepalived | bool @@ -55,14 +44,6 @@ - keepalived - role: "haproxy_server" haproxy_service_configs: "{{ haproxy_default_services + haproxy_extra_services|default([]) }}" - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: haproxy_log_rotate - rsyslog_client_log_dir: "/var/log/haproxy" - rsyslog_client_config_name: "99-haproxy-rsyslog-client.conf" - environment: "{{ deployment_environment_variables | default({}) }}" tags: - haproxy-config diff --git a/playbooks/memcached-install.yml b/playbooks/memcached-install.yml index c34994a326..e6d7a687ef 100644 --- a/playbooks/memcached-install.yml +++ b/playbooks/memcached-install.yml @@ -20,11 +20,6 @@ pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-memcached" - dest: "/var/log/memcached" - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -33,14 +28,6 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: memcached_log_rotate - rsyslog_client_log_dir: "/var/log/memcached" - rsyslog_client_config_name: "99-memcached-rsyslog-client.conf" - environment: "{{ deployment_environment_variables | default({}) }}" tags: - memcached diff --git a/playbooks/os-aodh-install.yml b/playbooks/os-aodh-install.yml index f3e33a4d36..2893340657 100644 --- a/playbooks/os-aodh-install.yml +++ b/playbooks/os-aodh-install.yml @@ -27,22 +27,9 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-aodh" - dest: "/var/log/aodh" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_aodh" - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: aodh_log_rotate - rsyslog_client_log_dir: "/var/log/aodh" - rsyslog_client_config_name: "99-aodh-rsyslog-client.conf" diff --git a/playbooks/os-barbican-install.yml b/playbooks/os-barbican-install.yml index 69dc0ff52a..358ba676a3 100644 --- a/playbooks/os-barbican-install.yml +++ b/playbooks/os-barbican-install.yml @@ -27,21 +27,8 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-barbican" - dest: "/var/log/barbican" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_barbican" - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: barbican_log_rotate - rsyslog_client_log_dir: "/var/log/barbican" - rsyslog_client_config_name: "99-barbican-rsyslog-client.conf" diff --git a/playbooks/os-blazar-install.yml b/playbooks/os-blazar-install.yml index 0beab419df..23bbdc191a 100644 --- a/playbooks/os-blazar-install.yml +++ b/playbooks/os-blazar-install.yml @@ -27,13 +27,6 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - name: Configure log directories (on metal) - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-blazar" - dest: "/var/log/blazar" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -47,10 +40,3 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: blazar_log_rotate - rsyslog_client_log_dir: "/var/log/blazar" - rsyslog_client_config_name: "99-blazar-rsyslog-client.conf" diff --git a/playbooks/os-ceilometer-install.yml b/playbooks/os-ceilometer-install.yml index 3cf5a58e63..e800448e0e 100644 --- a/playbooks/os-ceilometer-install.yml +++ b/playbooks/os-ceilometer-install.yml @@ -24,24 +24,12 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-ceilometer" - dest: "/var/log/ceilometer" - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_ceilometer" - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: ceilometer_log_rotate - rsyslog_client_log_dir: "/var/log/ceilometer" - rsyslog_client_config_name: "99-ceilometer-rsyslog-client.conf" - environment: "{{ deployment_environment_variables | default({}) }}" tags: - ceilometer diff --git a/playbooks/os-congress-install.yml b/playbooks/os-congress-install.yml index 8d18abe123..be59d25bb0 100644 --- a/playbooks/os-congress-install.yml +++ b/playbooks/os-congress-install.yml @@ -28,13 +28,6 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - name: Configure log directories (on metal) - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-congress" - dest: "/var/log/congress" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -48,10 +41,3 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: congress_log_rotate - rsyslog_client_log_dir: "/var/log/congress" - rsyslog_client_config_name: "99-congress-rsyslog-client.conf" diff --git a/playbooks/os-designate-install.yml b/playbooks/os-designate-install.yml index efcfd82c1e..d0a23d14e1 100644 --- a/playbooks/os-designate-install.yml +++ b/playbooks/os-designate-install.yml @@ -30,21 +30,8 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-designate" - dest: "/var/log/designate" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_designate" - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: designate_log_rotate - rsyslog_client_log_dir: "/var/log/designate" - rsyslog_client_config_name: "99-designate-rsyslog-client.conf" diff --git a/playbooks/os-gnocchi-install.yml b/playbooks/os-gnocchi-install.yml index da712a0258..ff17dc7044 100644 --- a/playbooks/os-gnocchi-install.yml +++ b/playbooks/os-gnocchi-install.yml @@ -30,12 +30,6 @@ - not is_metal - (gnocchi_storage_driver | default('file')) != "file" - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-gnocchi" - dest: "/var/log/gnocchi" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -51,10 +45,3 @@ - role: "os_gnocchi" gnocchi_identity_only: "{{ ((gnocchi_storage_driver | default('file')) == 'swift') | ternary(true, false)}}" - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: gnocchi_log_rotate - rsyslog_client_log_dir: "/var/log/gnocchi" - rsyslog_client_config_name: "99-gnocchi-rsyslog-client.conf" diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index 00b8323199..4be5e4b70b 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -27,12 +27,6 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-heat" - dest: "/var/log/heat" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -41,10 +35,3 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: heat_log_rotate - rsyslog_client_log_dir: "/var/log/heat" - rsyslog_client_config_name: "99-heat-rsyslog-client.conf" diff --git a/playbooks/os-horizon-install.yml b/playbooks/os-horizon-install.yml index 648a6c96b8..30989550ce 100644 --- a/playbooks/os-horizon-install.yml +++ b/playbooks/os-horizon-install.yml @@ -26,12 +26,6 @@ pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-horizon" - dest: "/var/log/horizon" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -40,10 +34,3 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: horizon_log_rotate - rsyslog_client_log_dir: "/var/log/horizon" - rsyslog_client_config_name: "99-horizon-rsyslog-client.conf" diff --git a/playbooks/os-ironic-install.yml b/playbooks/os-ironic-install.yml index ed01b829c3..7517f03fe6 100644 --- a/playbooks/os-ironic-install.yml +++ b/playbooks/os-ironic-install.yml @@ -35,10 +35,3 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: ironic_log_rotate - rsyslog_client_log_dir: "/var/log/ironic" - rsyslog_client_config_name: "99-ironic-rsyslog-client.conf" diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index 29610aa8db..139cac3af0 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -60,13 +60,6 @@ - "lxc.start.order=19" when: not is_metal - - name: Configure log directories (on metal) - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-keystone" - dest: "/var/log/keystone" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -78,12 +71,6 @@ - crontab post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: keystone_log_rotate - rsyslog_client_log_dir: "/var/log/keystone" - rsyslog_client_config_name: "99-keystone-rsyslog-client.conf" - # Now that container changes are done, we can set # the load balancer back end for this container # to available again. diff --git a/playbooks/os-magnum-install.yml b/playbooks/os-magnum-install.yml index 25b44a9617..9ee40ab868 100644 --- a/playbooks/os-magnum-install.yml +++ b/playbooks/os-magnum-install.yml @@ -29,22 +29,9 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-magnum" - dest: "/var/log/magnum" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_magnum" - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: magnum_log_rotate - rsyslog_client_log_dir: "/var/log/magnum" - rsyslog_client_config_name: "99-magnum-rsyslog-client.conf" diff --git a/playbooks/os-manila-install.yml b/playbooks/os-manila-install.yml index 864b1a52c4..5edc8aed94 100644 --- a/playbooks/os-manila-install.yml +++ b/playbooks/os-manila-install.yml @@ -51,13 +51,6 @@ - not is_metal - (manila_default_store != "file") or (manila_nfs_client is defined) - - name: Configure log directories (on metal) - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-manila" - dest: "/var/log/manila" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -71,12 +64,6 @@ - not inventory_hostname in groups['manila_api'] post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: manila_log_rotate - rsyslog_client_log_dir: "/var/log/manila" - rsyslog_client_config_name: "99-manila-rsyslog-client.conf" - # Now that container changes are done, we can set # the load balancer back end for this container # to available again. diff --git a/playbooks/os-masakari-install.yml b/playbooks/os-masakari-install.yml index 8d5029d516..b9e1d33dbc 100644 --- a/playbooks/os-masakari-install.yml +++ b/playbooks/os-masakari-install.yml @@ -36,11 +36,6 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-masakari" - dest: "/var/log/masakari" - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -49,11 +44,6 @@ - role: "os_masakari" post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: masakari_log_rotate - rsyslog_client_log_dir: "/var/log/masakari" - rsyslog_client_config_name: "99-masakari-rsyslog-client.conf" # Now that container changes are done, we can set # the load balancer back end for this container # to available again. diff --git a/playbooks/os-mistral-install.yml b/playbooks/os-mistral-install.yml index 1cc4314bf2..4682fdeebe 100644 --- a/playbooks/os-mistral-install.yml +++ b/playbooks/os-mistral-install.yml @@ -27,13 +27,6 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - name: Configure log directories (on metal) - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-mistral" - dest: "/var/log/mistral" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -47,10 +40,3 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: mistral_log_rotate - rsyslog_client_log_dir: "/var/log/mistral" - rsyslog_client_config_name: "99-mistral-rsyslog-client.conf" diff --git a/playbooks/os-octavia-install.yml b/playbooks/os-octavia-install.yml index a8049030ea..edd64940d7 100644 --- a/playbooks/os-octavia-install.yml +++ b/playbooks/os-octavia-install.yml @@ -27,12 +27,6 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-octavia" - dest: "/var/log/octavia" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -41,10 +35,3 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: octavia_log_rotate - rsyslog_client_log_dir: "/var/log/octavia" - rsyslog_client_config_name: "100-octavia-rsyslog-client.conf" diff --git a/playbooks/os-panko-install.yml b/playbooks/os-panko-install.yml index 14ad2f2ba3..abddb2e730 100644 --- a/playbooks/os-panko-install.yml +++ b/playbooks/os-panko-install.yml @@ -25,18 +25,5 @@ pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-panko" - dest: "/var/log/panko" roles: - role: "os_panko" - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: panko_log_rotate - rsyslog_client_log_dir: "/var/log/panko" - rsyslog_client_config_name: "99-panko-rsyslog-client.conf" diff --git a/playbooks/os-placement-install.yml b/playbooks/os-placement-install.yml index b32f2d01c3..e8509775d7 100644 --- a/playbooks/os-placement-install.yml +++ b/playbooks/os-placement-install.yml @@ -27,13 +27,6 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - name: Configure log directories (on metal) - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-placement" - dest: "/var/log/placement" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -47,10 +40,3 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: placement_log_rotate - rsyslog_client_log_dir: "/var/log/placement" - rsyslog_client_config_name: "99-placement-rsyslog-client.conf" diff --git a/playbooks/os-sahara-install.yml b/playbooks/os-sahara-install.yml index b78dd6c3a8..49137e7abd 100644 --- a/playbooks/os-sahara-install.yml +++ b/playbooks/os-sahara-install.yml @@ -25,21 +25,8 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-sahara" - dest: "/var/log/sahara" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_sahara" - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: sahara_log_rotate - rsyslog_client_log_dir: "/var/log/sahara" - rsyslog_client_config_name: "99-sahara-rsyslog-client.conf" diff --git a/playbooks/os-swift-install.yml b/playbooks/os-swift-install.yml index b1ef33f34f..60e676a394 100644 --- a/playbooks/os-swift-install.yml +++ b/playbooks/os-swift-install.yml @@ -27,11 +27,6 @@ - "lxc.start.order=39" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-swift" - dest: "/var/log/swift" - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -51,16 +46,6 @@ - role: "system_crontab_coordination" tags: - crontab - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: swift_log_rotate - rsyslog_client_log_dir: "/var/log/swift" - rsyslog_client_config_name: "99-swift-rsyslog-client.conf" - rsyslog_client_log_files: - - /var/log/rsyncd.log - environment: "{{ deployment_environment_variables | default({}) }}" tags: - swift diff --git a/playbooks/os-tacker-install.yml b/playbooks/os-tacker-install.yml index 9937f3f41e..15a9ecf0b7 100644 --- a/playbooks/os-tacker-install.yml +++ b/playbooks/os-tacker-install.yml @@ -26,18 +26,5 @@ pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-tacker" - dest: "/var/log/tacker" roles: - role: "os_tacker" - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: tacker_log_rotate - rsyslog_client_log_dir: "/var/log/tacker" - rsyslog_client_config_name: "99-tacker-rsyslog-client.conf" diff --git a/playbooks/os-trove-install.yml b/playbooks/os-trove-install.yml index 9866e2891b..426cfe15c7 100644 --- a/playbooks/os-trove-install.yml +++ b/playbooks/os-trove-install.yml @@ -30,21 +30,8 @@ - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-trove" - dest: "/var/log/trove" - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: - role: "os_trove" - - post_tasks: - - include_tasks: "common-tasks/rsyslog-client.yml" - vars: - rsyslog_client_log_rotate_file: trove_log_rotate - rsyslog_client_log_dir: "/var/log/trove" - rsyslog_client_config_name: "99-trove-rsyslog-client.conf" diff --git a/releasenotes/notes/use_journalctl-a9a19f80b14f4f87.yaml b/releasenotes/notes/use_journalctl-a9a19f80b14f4f87.yaml new file mode 100644 index 0000000000..a1a36e4313 --- /dev/null +++ b/releasenotes/notes/use_journalctl-a9a19f80b14f4f87.yaml @@ -0,0 +1,11 @@ +--- +features: + - | + All roles are migrated from usage of regular log files to systemd-journald +deprecations: + - | + Due to usage of systemd-journald mapping of /openstack/log/ to + /var/log/$SERVICE is not present anymore. Also rsyslog_client role is not + called for projects since logs are stored in journald. + Also variables like service_log_dir are not supported anymore and have no + effect. diff --git a/scripts/log-collect.sh b/scripts/log-collect.sh index 715668d7e8..3f7977e155 100755 --- a/scripts/log-collect.sh +++ b/scripts/log-collect.sh @@ -44,7 +44,7 @@ COMMON_ETC_LOG_NAMES="apt \ memcached \ mongodb \ my.cnf \ - mysql \ + mariadb \ netplan \ network \ nginx \