Skip to content

Commit 5a1d380

Browse files
Merge pull request #1013 from rabi/logging
Remove all /var/log/containers/* mounts
2 parents ffd36b8 + 2a8aade commit 5a1d380

File tree

11 files changed

+13
-31
lines changed

11 files changed

+13
-31
lines changed

plugins/modules/edpm_container_manage.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
log_base_path:
7474
description:
7575
- Log base path directory
76+
- DEPRECATED - Services now log to journald, this parameter is ignored
7677
type: str
7778
default: '/var/log/containers/stdouts'
7879
concurrency:
@@ -129,6 +130,15 @@ def __init__(self, module, results):
129130
self.log_base_path = args.get('log_base_path')
130131
self.debug = args.get('debug')
131132

133+
# Deprecation warning for log_base_path
134+
if self.log_base_path and self.log_base_path != '/var/log/containers/stdouts':
135+
self.module.deprecate(
136+
"The 'log_base_path' parameter is deprecated and ignored. "
137+
"Services now log to journald instead of files.",
138+
version="0.0.2",
139+
collection_name="osp.edpm"
140+
)
141+
132142
self.run()
133143

134144
self.module.exit_json(**self.results)
@@ -288,7 +298,6 @@ def manage_container(self, name, config):
288298
'debug': self.debug,
289299
'log_driver': 'journald',
290300
'log_level': 'info',
291-
'log_opt': {"path": f"{self.log_base_path}/{name}.log"},
292301
}
293302
opts.update(config)
294303
# do horible things to convert THT format to ansible module format

roles/edpm_container_manage/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ edpm_container_manage_config_id: edpm
2828
edpm_container_manage_config_overrides: {}
2929
edpm_container_manage_config_patterns: '*.json'
3030
edpm_container_manage_healthcheck_disabled: false
31-
edpm_container_manage_log_path: '/var/log/containers/stdouts'
31+
edpm_container_manage_log_path: '/var/log/containers/stdouts' # DEPRECATED: ignored, services log to journald
3232
edpm_container_manage_systemd_teardown: true

roles/edpm_container_manage/meta/argument_specs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ argument_specs:
3737
edpm_container_manage_log_path:
3838
type: str
3939
default: '/var/log/containers/stdouts'
40+
description: 'DEPRECATED (will be removed in v0.0.2): Log path for containers - services now log to journald'
4041
edpm_container_manage_systemd_teardown:
4142
type: bool
4243
default: true

roles/edpm_container_manage/tasks/main.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@
1414
# License for the specific language governing permissions and limitations
1515
# under the License.
1616

17-
- name: Create container logs path
18-
ansible.builtin.file:
19-
path: "{{ edpm_container_manage_log_path }}"
20-
state: directory
21-
owner: root
22-
group: root
23-
mode: "0755"
24-
become: true
25-
2617
- name: Generate containers configs data
2718
become: true
2819
block:

roles/edpm_nova/molecule/default/test-data/nova-cell1/02-nova-log.conf

Lines changed: 0 additions & 5 deletions
This file was deleted.

roles/edpm_nova/molecule/default/verify.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
- "/etc/tmpfiles.d/"
1616
- "/var/lib/openstack"
1717
- "/var/lib/openstack/config/containers"
18-
- "/var/log/containers"
19-
- "/var/log/containers/stdouts"
2018
- "/etc/ssh/ssh_known_hosts"
2119
# extrenal deps
2220
- "/var/lib/openstack/config/ceph"
@@ -25,7 +23,6 @@
2523
- "/var/lib/openstack/config/nova"
2624
- "/var/lib/_nova_secontext"
2725
- "/var/lib/nova/instances"
28-
- "/var/log/containers/nova"
2926
# NOTE(sean-k-mooney): this directory is normaly created by the edpm_install_cert role
3027
# in molecule we create it in prepare so lets just assert it exists
3128
- "{{ edpm_nova_tls_ca_src_dir }}"
@@ -53,7 +50,6 @@
5350
loop:
5451
- "Copying /var/lib/kolla/config_files/nova-blank.conf to /etc/nova/nova.conf"
5552
- "Copying /var/lib/kolla/config_files/01-nova.conf to /etc/nova/nova.conf.d/01-nova.conf"
56-
- "Copying /var/lib/kolla/config_files/02-nova-log.conf to /etc/nova/nova.conf.d/02-nova-log.conf"
5753
- "Copying /var/lib/kolla/config_files/ssh-config to /var/lib/nova/.ssh/config"
5854
- "Copying /var/lib/kolla/config_files/ssh-privatekey to /var/lib/nova/.ssh/ssh-privatekey"
5955
- "Copying /var/lib/kolla/config_files/02-nova-host-specific.conf to /etc/nova/nova.conf.d/02-nova-host-specific.conf"

roles/edpm_nova/tasks/configure.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@
103103
loop:
104104
- {"path": "/var/lib/nova", "mode": "0755"}
105105
- {"path": "/var/lib/_nova_secontext", "mode": "0755"}
106-
- {"path": "/var/lib/nova/instances", "mode", "0755"}
107-
- {"path": "/var/log/containers/nova", "mode": "0750"}
108-
- {"path": "/var/log/containers/stdouts"}
106+
- {"path": "/var/lib/nova/instances", "mode": "0755"}
109107
- {"path": "/etc/ceph", "mode": "0750", "owner": "root", "group": "root"}
110108
- {"path": "/etc/multipath"}
111109
- {"path": "/etc/iscsi"}

roles/edpm_nova/templates/config.json.j2

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@
4242
}
4343
],
4444
"permissions": [
45-
{
46-
"path": "/var/log/containers/nova",
47-
"owner": "nova:nova",
48-
"recurse": true
49-
},
5045
{
5146
"path": "/etc/ceph/*",
5247
"owner": "nova:nova",

roles/edpm_nova/templates/nova_compute.json.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"/etc/localtime:/etc/localtime:ro",
1717
"/lib/modules:/lib/modules:ro",
1818
"/dev:/dev",
19-
"/var/log/containers/nova:/var/log/containers/nova",
2019
"/var/lib/libvirt:/var/lib/libvirt",
2120
"/run/libvirt:/run/libvirt:shared",
2221
"/var/lib/nova:/var/lib/nova:shared",

roles/edpm_swift/defaults/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ edpm_swift_storage_volumes:
4343
- /srv/node:/srv/node
4444
- /dev:/dev
4545
- /var/cache/swift:/var/cache/swift
46-
- /var/log/containers/swift:/var/log/containers/swift
4746
- /var/lib/openstack/config/swift:/var/lib/kolla/config_files/src:ro
4847

4948
edpm_swift_account_auditor_volumes:

0 commit comments

Comments
 (0)