Skip to content

Issue 5414#5431

Merged
vushu merged 8 commits intoissue-5413from
issue-5414
Mar 20, 2026
Merged

Issue 5414#5431
vushu merged 8 commits intoissue-5413from
issue-5414

Conversation

@vushu
Copy link
Copy Markdown
Contributor

@vushu vushu commented Mar 10, 2026

Added rentention cleanup logic for audit logs

This PR is based on https://github.com/SDU-eScience/UCloud/compare/issue-5413

@vushu vushu requested a review from DanThrane March 10, 2026 11:52
@DanThrane
Copy link
Copy Markdown
Collaborator

Can we rename it to something like job audit log? To differentiate it from the other audit log that the IM also has (for requests, it is in the audit_logs database schema).

@vushu
Copy link
Copy Markdown
Contributor Author

vushu commented Mar 12, 2026

I have renamed it job audit log as suggested.

@vushu
Copy link
Copy Markdown
Contributor Author

vushu commented Mar 12, 2026

Updated to walk through dirs and consider child folders, since each job has it's own folder inside audit that is the jobs id.

go func() {
cleanupLogs(retentionDays) // run once at startup

ticker := time.NewTicker(24 * time.Hour)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to increase the frequency that this runs. Mostly to account for potential restarts of the service. Every 4 hours should be fine.

@vushu vushu requested a review from DanThrane March 13, 2026 12:54
"ucloud.dk/shared/pkg/log"
)

var jobAuditLogFolder = "/mnt/storage/audit"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not guaranteed to be the correct mount-point. See the MountPoint configuration option.

@vushu vushu requested a review from DanThrane March 16, 2026 09:35
@vushu vushu merged commit 0b2f463 into issue-5413 Mar 20, 2026
@DanThrane DanThrane deleted the issue-5414 branch March 27, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants