Skip to content

Conversation

@weizhouapache
Copy link
Member

Description

This PR fixes #3757

This adds a daily cron job to clean up files in /var/cache/cloud/processed older than 180 days, 179 days, ... until the disk space usage does not exceed threshold (80%). the logs in last 5 days will not be cleaned.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@weizhouapache weizhouapache requested a review from nvazquez August 18, 2021 11:23
@weizhouapache weizhouapache added this to the 4.15.2.0 milestone Aug 18, 2021
@weizhouapache weizhouapache reopened this Aug 18, 2021
@nvazquez
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

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

Code LGTM

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✖️ el8 ✔️ debian. SL-JID 917

@nvazquez
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 924

@nvazquez
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian Build Failed (tid-1711)

@ravening
Copy link
Member

@weizhouapache the logrotate service should be able to take care of this right rather than adding a new shell script? we can specify the duration to keep the logs also

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@weizhouapache
Copy link
Member Author

@weizhouapache the logrotate service should be able to take care of this right rather than adding a new shell script? we can specify the duration to keep the logs also

@ravening no. logrorate will rotate the log files in /var/log

@ravening
Copy link
Member

@weizhouapache the logrotate service should be able to take care of this right rather than adding a new shell script? we can specify the duration to keep the logs also

@ravening no. logrorate will rotate the log files in /var/log

@weizhouapache but we can add an extra rule to monitor /var/cache also right?

@blueorangutan
Copy link

Trillian test result (tid-1714)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34754 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5331-t1714-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_iso.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Smoke tests completed. 87 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@weizhouapache
Copy link
Member Author

@weizhouapache the logrotate service should be able to take care of this right rather than adding a new shell script? we can specify the duration to keep the logs also

@ravening no. logrorate will rotate the log files in /var/log

@weizhouapache but we can add an extra rule to monitor /var/cache also right?

@ravening the problem is, we do not know what the filenames are.
here is an example

root@r-88-VM:~# ls -l /var/cache/cloud/processed/
total 24
-rw-r--r-- 1 root root 239 Aug 19 07:44 vm_dhcp_entry.json.82cf8311-f5d4-4a10-9b50-001e0558082a.gz
-rw-r--r-- 1 root root 239 Aug 19 07:42 vm_dhcp_entry.json.ef071140-60d8-4a20-970d-ca4979aee9f5.gz
-rw-r--r-- 1 root root 406 Aug 19 07:44 vm_metadata.json.26853b78-280b-4ea5-94b2-55e83bb332e4.gz
-rw-r--r-- 1 root root 406 Aug 19 07:42 vm_metadata.json.27cbd5c6-43b8-417f-8c1d-e51fc697ce10.gz
-rw-r--r-- 1 root root 160 Aug 19 07:42 vm_password.json.08296973-3f9a-4fb5-ac75-d9c9c9c9c8fb.gz
-rw-r--r-- 1 root root 160 Aug 19 07:44 vm_password.json.dea5c53d-043a-43f1-980c-f904a1e7b5b7.gz

Copy link
Contributor

@davidjumani davidjumani left a comment

Choose a reason for hiding this comment

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

CLGTM

@@ -0,0 +1,22 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

license header needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

@DaanHoogland good question...

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@weizhouapache weizhouapache deleted the 4.15-clean-processed-files branch December 9, 2022 08:44
@weizhouapache weizhouapache mentioned this pull request Aug 21, 2023
12 tasks
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.

Files in /var/cache/cloud/processed on virtual router are not cleaned up

7 participants