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
This commit is contained in:
Maor Blaustein 2024-09-04 14:01:02 +03:00
parent 0219e833da
commit 228f1b1436

View File

@ -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)