From 228f1b14363bee291a59957c206b934877a99004 Mon Sep 17 00:00:00 2001 From: Maor Blaustein Date: Wed, 4 Sep 2024 14:01:02 +0300 Subject: [PATCH] Fix SGL tests log file for podified Due to OSPRH-9248, security group logging writes to journal, changed in tests accordingly to '/var/log/messages'. Log rotation test will be skipped on podified. Change-Id: I4402e777c5262da154bf56351fd57625108c0381 --- .../tests/scenario/test_security_group_logging.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py index 15ca8a1..218ad22 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py @@ -49,7 +49,7 @@ class BaseSecGroupLoggingTest( required_extensions = ['router', 'security-group', 'logging'] if WB_CONF.openstack_type == 'podified': - SG_LOG_FILE = '/var/log/containers/openvswitch/ovn-controller.log' + SG_LOG_FILE = '/var/log/messages' ML2_CONF_FILE = '/etc/neutron/plugins/ml2/ml2_conf.ini' rotate_service_fix = '-crond' elif WB_CONF.openstack_type == 'devstack': @@ -786,8 +786,9 @@ class BaseSecGroupLoggingTest( rotate_prefix + 'grep maxsize /etc/logrotate{}.conf; true'.format( self.rotate_service_fix), ssh_client=vm_a['hv_ssh_client']).rstrip().split(' ')[-1] - # if setup type supports log rotation due to size, then test - if maxsize_si: + # if setup type supports log rotation due to size, then test. + # also skips rotation test on podified since logging to journal + if maxsize_si and WB_CONF.openstack_type != 'podified': # convert to bytes without SI prefixes k/M/G (logrotate SI options) try: power = 10 * ('kMG'.index(maxsize_si[-1]) + 1)