From f3e3853cbdd27f6384b54b892d8923f2ef327b0d Mon Sep 17 00:00:00 2001 From: Denise Unterwurzacher Date: Mon, 4 Jan 2021 16:57:42 -0600 Subject: [PATCH] ITPLAT-387 catalina.err isn't a standard log file - standard Tomcat logging directs both stdout and stderr to catalina.out. See https://tomcat.apache.org/tomcat-8.0-doc/logging.html --- roles/product_startup/molecule/bitbucket/tests/test_default.py | 2 +- roles/product_startup/molecule/default/tests/test_default.py | 2 +- roles/product_startup/molecule/synchrony/tests/test_default.py | 2 +- roles/product_startup/templates/product.service.j2 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/product_startup/molecule/bitbucket/tests/test_default.py b/roles/product_startup/molecule/bitbucket/tests/test_default.py index a8b6cf6..9b87f78 100644 --- a/roles/product_startup/molecule/bitbucket/tests/test_default.py +++ b/roles/product_startup/molecule/bitbucket/tests/test_default.py @@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( def test_service_file(host): systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib" f = host.file(systemd_prefix+'/systemd/system/bitbucket.service') - assert f.contains("^ExecStart=/opt/atlassian/bitbucket/current/bin/start-bitbucket.sh -fg --no-search >/opt/atlassian/bitbucket/current/logs/catalina.out 2>/opt/atlassian/bitbucket/current/logs/catalina.err$") + assert f.contains("^ExecStart=/opt/atlassian/bitbucket/current/bin/start-bitbucket.sh -fg --no-search >/opt/atlassian/bitbucket/current/logs/catalina.out 2>&1$") assert f.contains("^UMask=0027$") assert f.contains("^LimitNOFILE=4096$") assert f.contains("^Environment=BITBUCKET_HOME=/media/atl/bitbucket$") diff --git a/roles/product_startup/molecule/default/tests/test_default.py b/roles/product_startup/molecule/default/tests/test_default.py index aadbb03..da1819b 100644 --- a/roles/product_startup/molecule/default/tests/test_default.py +++ b/roles/product_startup/molecule/default/tests/test_default.py @@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( def test_service_file(host): systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib" f = host.file(systemd_prefix+'/systemd/system/jira-software.service') - assert f.contains("^ExecStart=/opt/atlassian/jira-software/current/bin/start-jira.sh -fg >/opt/atlassian/jira-software/current/logs/catalina.out 2>/opt/atlassian/jira-software/current/logs/catalina.err$") + assert f.contains("^ExecStart=/opt/atlassian/jira-software/current/bin/start-jira.sh -fg >/opt/atlassian/jira-software/current/logs/catalina.out 2>&1$") assert f.user == 'root' assert f.group == 'root' assert f.mode == 0o0640 diff --git a/roles/product_startup/molecule/synchrony/tests/test_default.py b/roles/product_startup/molecule/synchrony/tests/test_default.py index f6217d6..52a98fb 100644 --- a/roles/product_startup/molecule/synchrony/tests/test_default.py +++ b/roles/product_startup/molecule/synchrony/tests/test_default.py @@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( def test_service_file(host): systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib" f = host.file(systemd_prefix+'/systemd/system/synchrony.service') - assert f.contains("^ExecStart=/opt/atlassian/bin/start-synchrony >/opt/atlassian/confluence/current/logs/catalina.out 2>/opt/atlassian/confluence/current/logs/catalina.err$") + assert f.contains("^ExecStart=/opt/atlassian/bin/start-synchrony >/opt/atlassian/confluence/current/logs/catalina.out 2>&1$") assert f.contains("^EnvironmentFile=/etc/atl$") assert f.contains("^EnvironmentFile=/etc/atl.synchrony$") assert f.contains("^WorkingDirectory=/opt/atlassian/confluence/current/logs/$") diff --git a/roles/product_startup/templates/product.service.j2 b/roles/product_startup/templates/product.service.j2 index 2d1235d..53deb26 100644 --- a/roles/product_startup/templates/product.service.j2 +++ b/roles/product_startup/templates/product.service.j2 @@ -12,7 +12,7 @@ StandardError=journal+console {{ p }} {% endfor %} -ExecStart={{ atl_startup_exec_path }}{% for c in atl_startup_exec_options %} {{ c }}{% endfor %} >{{ atl_product_installation_current }}/logs/catalina.out 2>{{ atl_product_installation_current }}/logs/catalina.err +ExecStart={{ atl_startup_exec_path }}{% for c in atl_startup_exec_options %} {{ c }}{% endfor %} >{{ atl_product_installation_current }}/logs/catalina.out 2>&1 Restart=on-failure