Commit 5b2556a1 authored by Łukasz Nowak's avatar Łukasz Nowak

rapid-cdn: Sync ATS log retention to configuration:rotate-num

parent fb866cd1
Pipeline #36139 failed with stage
in 0 seconds
...@@ -22,7 +22,7 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68 ...@@ -22,7 +22,7 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-frontend] [profile-frontend]
filename = instance-frontend.cfg.in filename = instance-frontend.cfg.in
md5sum = b3c5694042035f13832479dca3481597 md5sum = af6c2d8dfa36c9012c6ef905689972ff
[profile-master] [profile-master]
filename = instance-master.cfg.in filename = instance-master.cfg.in
......
...@@ -651,7 +651,7 @@ output = ${directory:bin}/trafficserver-rotate ...@@ -651,7 +651,7 @@ output = ${directory:bin}/trafficserver-rotate
xz_binary = {{ software_parameter_dict['xz_location'] ~ '/bin/xz' }} xz_binary = {{ software_parameter_dict['xz_location'] ~ '/bin/xz' }}
pattern = *.old pattern = *.old
# days to keep log files # days to keep log files
keep_days = 365 keep_days = ${configuration:rotate-num}
extra-context = extra-context =
raw find_executable {{ software_parameter_dict['findutils'] }}/bin/find raw find_executable {{ software_parameter_dict['findutils'] }}/bin/find
......
...@@ -2111,7 +2111,8 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin): ...@@ -2111,7 +2111,8 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
) )
# check retention # check retention
old_time = time.time() - (400 * 24 * 3600) # 4000 is default configuration:rotate-num, so make the log a bit older
old_time = time.time() - (4010 * 24 * 3600)
os.utime( os.utime(
os.path.join(ats_logrotate_dir, older_file_name + '.xz'), os.path.join(ats_logrotate_dir, older_file_name + '.xz'),
(old_time, old_time)) (old_time, old_time))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment