Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move postprocessing restarts into one cronjob #524

Merged
merged 3 commits into from
Apr 11, 2024

Conversation

wkloucek
Copy link
Contributor

@wkloucek wkloucek commented Apr 5, 2024

Description

Replaces the two postprocessing restart maintenance cronjobs with one storageusers postprocessing restart maintenance cronjob.

Related Issue

Motivation and Context

Also restart postprocessing for files that are not in the postprocessing store, but only on disk.

How Has This Been Tested?

  • minikube with ocis-nats deployment example:
  1. make all files stuck in postprocessing: kubectl exec -n ocis-nats deployments/nats-box -- sh -c 'nats consumer rm -f main-queue antivirus; nats consumer rm -f main-queue audit; nats consumer rm -f main-queue clientlog; nats consumer rm -f main-queue dcfs; nats consumer rm -f main-queue evhistory; nats consumer rm -f main-queue frontend; nats consumer rm -f main-queue notifications; nats consumer rm -f main-queue policies; nats consumer rm -f main-queue postprocessing; nats consumer rm -f main-queue search; nats consumer rm -f main-queue storage-users; nats consumer rm -f main-queue userlog'
  2. upload files and confirm they are in postprocessing (kubectl -n ocis exec deployment/storageusers -it -- ocis storage-users uploads list)
  3. restart all ocis pods to recreate nats consumers: k rollout restart deploy -n ocis
  4. enable cronjob:
diff --git a/deployments/ocis-nats/helmfile.yaml b/deployments/ocis-nats/helmfile.yaml
index 61461fa..2639a17 100644
--- a/deployments/ocis-nats/helmfile.yaml
+++ b/deployments/ocis-nats/helmfile.yaml
@@ -73,6 +73,9 @@ releases:
     namespace: ocis
     chart: ../../charts/ocis
     values:
+      - image:
+          repository: wkloucek/ocis
+          tag: release-5.0.1-8d1ba0244c3203c9bd2ac05b683d01afe885fc8d
       - externalDomain: ocis.kube.owncloud.test
       - ingress:
           enabled: true
@@ -130,6 +133,10 @@ releases:
           storageusers:
             persistence:
               enabled: true
+            maintenance:
+              restartPostprocessing:
+                enabled: true
+                schedule: "*/5 * * * *"
 
           thumbnails:
             persistence:
  1. wait for the cronjob to run. see that it actually restarted the postprocessing for the files you had stuck in postprocessing
  2. verify that the files are no longer in postprocessing via the web ui

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation generated (make docs) and committed
  • Documentation ticket raised:
  • Documentation PR created:

@wkloucek wkloucek requested a review from d7oc April 10, 2024 12:26
@wkloucek
Copy link
Contributor Author

@d7oc I'll keep this PR in draft until I actually tested it with oCIS 5.0.1, but you could give this already a review.

Copy link
Contributor

@d7oc d7oc left a comment

Choose a reason for hiding this comment

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

LGTM

@wkloucek wkloucek marked this pull request as ready for review April 11, 2024 08:19
@wkloucek
Copy link
Contributor Author

Tested again with 5.0.1 -> works like a charm

@wkloucek wkloucek merged commit 83396e3 into owncloud:main Apr 11, 2024
1 check passed
@wkloucek wkloucek deleted the postprocessing-restart branch April 11, 2024 09:29
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