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

next branch tracker for oCIS latest 5.0 compatiblity #406

Closed
11 of 12 tasks
wkloucek opened this issue Oct 11, 2023 · 20 comments
Closed
11 of 12 tasks

next branch tracker for oCIS latest 5.0 compatiblity #406

wkloucek opened this issue Oct 11, 2023 · 20 comments
Labels
Category:Enhancement Add new functionality

Comments

@wkloucek
Copy link
Contributor

wkloucek commented Oct 11, 2023

Chart changes

  • bannedPasswordsList / FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST -> this is a path!? where comes the file from!? Probably we should hardcode FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST and only allow to set a ConfigMap reference to enable this list -> fixed in improve next #410
  • why has the authservice /tmp volume? (from what I know this is only required for reva service to create pid files) -> it's a reve service and stores a pid file there
  • prepare documentation PR for next branch changes
  • clientlog service keeps restarting with exit code 2 -> fixed in fix clientlog restart loop #411
  • why has the authservice environment variable AUTH_SERVICE_API_KEY that is not known to the documentation -> fix in remove non existing AUTH_SERVICE_API_KEY #413

Adapt to latest latest master

Code Changes

@wkloucek
Copy link
Contributor Author

@kobergj maybe we can have a look at this together tomorrow?

@wkloucek
Copy link
Contributor Author

@micbar @kobergj looks like the next branch is in a pretty good shape now. Do you have something that should be added / changed?

@wkloucek
Copy link
Contributor Author

From my POV, only #414 is currently open for next. There seems to be something fishy.

@micbar
Copy link
Contributor

micbar commented Oct 23, 2023

autoAcceptShares: true -> oCIS product defaults will also switch to true

This would need service accounts.

@wkloucek
Copy link
Contributor Author

autoAcceptShares: true -> oCIS product defaults will also switch to true

This would need service accounts.

We have them already in the oCIS Helm Chart on next branch. This is just a tracker to check if oCIS product goes to auto accept share defaulting to true (is currently not the case for the oCIS product, but for the Helm Chart). I'd prefer them to be in sync.

@kobergj
Copy link
Contributor

kobergj commented Oct 24, 2023

Auto accept is already true on default in ocis since owncloud/ocis#7477

@wkloucek
Copy link
Contributor Author

Auto accept is already true on default in ocis since owncloud/ocis#7477

Looks like https://github.com/owncloud/ocis/blob/master/changelog/unreleased/auto-accept-shares.md should be updated and changed to Change instead of Enhancement

@kobergj
Copy link
Contributor

kobergj commented Oct 24, 2023

Quick change: owncloud/ocis#7569

@wkloucek
Copy link
Contributor Author

Currently missing no next branch:

@wkloucek
Copy link
Contributor Author

Some more configuration options + more recent oCIS: #419

@wkloucek wkloucek added the Category:Enhancement Add new functionality label Oct 27, 2023
@wkloucek wkloucek pinned this issue Oct 27, 2023
@case0sh case0sh unpinned this issue Nov 6, 2023
@wkloucek
Copy link
Contributor Author

We should expose settings for:

@wkloucek
Copy link
Contributor Author

@micbar I lost a little track what we need to do in the oCIS Chart for a good oCIS 5 support. These are things that come to my mind:

  • support nats-js-kv store / cache (might be forbidden right now)
  • we have now different new / change cli commands
    • what changes are needed for the uploads cleanup?
    • do we need new cron jobs? eg. restarting postprocessing?

Do you have more things that come to your mind?

@micbar
Copy link
Contributor

micbar commented Dec 13, 2023

Nats ja cache will come with 5.0.0-beta.2.

@butonic can you provide the info about the new cleanup cli?

@micbar
Copy link
Contributor

micbar commented Dec 14, 2023

we have now different new / change cli commands

One change still pending owncloud/ocis#7933

what changes are needed for the uploads cleanup?

We basically have the new ocis storage-users uploads sessions command which should replace the cis storage-users uploads list

NAME:
   ocis storage-users uploads sessions - Print a list of upload sessions

USAGE:
   ocis storage-users uploads sessions [command options] [arguments...]

OPTIONS:
   --id value      filter sessions by upload session id
   --processing    filter sessions by processing status
   --expired       filter sessions by expired status
   --output value  output format to use (can be 'plain' or 'json',  experimental) (default: plain)
   --help, -h      show help

@butonic please provide more info for @wkloucek

Will that be available also on the stable-4.0?

do we need new cron jobs? eg. restarting postprocessing?

Custom Postprocessing Steps

By using the envvar POSTPROCESSING_STEPS, custom postprocessing steps can be added. Any word can be used as step name but be careful not to conflict with exising keywords like virusscan and delay. In addition, if a keyword is misspelled or the corresponding service does either not exist or does not follow the necessary event communication, the postprocessing service will wait forever getting the required response to proceed and does not continue any other processing.

Prerequisites

For using custom postprocessing steps you need a custom service listening to the configured event system (see General Prerequisites)

Workflow

When defining a custom postprocessing step (eg. "customstep"), the postprocessing service will eventually send an event during postprocessing. The event will be of type StartPostprocessingStep with its field StepToStart set to "customstep". When the service defined as custom step receives this event, it can safely execute its actions. The postprocessing service will wait until it has finished its work. The event contains further information (filename, executing user, size, ...) and also requires tokens and URLs to download the file in case byte inspection is necessary.

Once the service defined as custom step has finished its work, it should send an event of type PostprocessingFinished via the configured events system back to the postprocessing service. This event needs to contain a FinishedStep field set to "customstep". It also must contain the outcome of the step, which can be one of the following:

  • delete: Abort postprocessing, delete the file.
  • abort: Abort postprocessing, keep the file.
  • retry: There was a problem that was most likely temporary and may be solved by trying again after some backoff duration. Retry runs automatically and is defined by the backoff behavior as described below.
  • continue: Continue postprocessing, this is the success case.

The backoff behavior as mentioned in the retry outcome can be configured using the POSTPROCESSING_RETRY_BACKOFF_DURATION and POSTPROCESSING_MAX_RETRIES environment variables. The backoff duration is calculated using the following formula after each failure: backoff_duration = POSTPROCESSING_RETRY_BACKOFF_DURATION * 2^(number of failures - 1). This means that the time between the next round grows exponentially limited by the number of retries. Steps that still don't succeed after the maximum number of retries will be automatically moved to the abort state.

See the cs3 org for up-to-date information of reserved step names and event definitions.

@butonic
Copy link
Member

butonic commented Dec 14, 2023

The ocis storage-users uploads list and ocis storage-users uploads clean commands have been fixed. They can be used as is and now work as they were originally intended.

  • list will show upload sessions that have not yet expired, including uploads that are in postprocessing
  • clean will now only remove expired uploads that are not in postprocessing.

So any jobs periodically cleaning expired uploads using clean should now work as expected.

To give admins even more control over upload sessions we also added the ocis storage-users uploads sessions command. It can be used to filter upload sessions by id, processing state or expired status. The options reflect what is possible with the current interface. We can certainly add more filters or e.g. a --purge option that could then be used to kill a specific upload ... or multiple. I don't know if deleting all uploads that will expire before/after a given timestamp is a valuable thing.
For more robust integration with scripts the sessions command also allows rendering the list of upload sessions as JSON.

@wkloucek
Copy link
Contributor Author

So any jobs periodically cleaning expired uploads using clean should now work as expected.

That's great, so we don't need to change the current one 🥳

@wkloucek
Copy link
Contributor Author

@micbar I didn't get your part about postprocessing. Where can retry be configured? Is this supposed to go to ANTIVIRUS_INFECTED_FILE_HANDLING!? How does that help restarting the postprocessing pipelines?

@wkloucek
Copy link
Contributor Author

wkloucek commented Jan 2, 2024

Something seems to be broken for next #458

@wkloucek
Copy link
Contributor Author

@micbar I didn't get your part about postprocessing. Where can retry be configured? Is this supposed to go to ANTIVIRUS_INFECTED_FILE_HANDLING!? How does that help restarting the postprocessing pipelines?

@micbar could you please clarify?

@kobergj
Copy link
Contributor

kobergj commented Jan 18, 2024

No additional configuration needed. It will automatically retry when it hits an error. Compare https://github.com/owncloud/ocis/blob/master/services/antivirus/pkg/service/service.go#L178-L188

ANTIVIRUS_INFECTED_FILE_HANDLING only configures what to do with an infected file.

@wkloucek wkloucek changed the title next branch tracker for oCIS latest compatiblity next branch tracker for oCIS latest 5.0 compatiblity Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Enhancement Add new functionality
Projects
None yet
Development

No branches or pull requests

4 participants