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

Catch storage not available in versions expire command #24363

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

ChristophWurst
Copy link
Member

External storage with session credentials is not accessible without a
user session, hence background jobs and CLI commands can't work with
them. The previously unhandled exception causes logged errors in the
nextcloud log. This patch catches the specific exception and logs it as
warnings. So for a production instance the error won't spam their logs
for this non-recoverable and technically unsolvable error if the minimum
log level is set to the default of 3 (error).

I'm using ILogger here because the patch shall be backported.

I will also update the admin docs that currently don't list this limitation.

Ref https://docs.nextcloud.com/server/20/admin_manual/configuration_files/external_storage/auth_mechanisms.html?highlight=external#password-based-mechanisms

External storage with session credentials is not accessible without a
user session, hence background jobs and CLI commands can't work with
them. The previously unhandled exception causes logged errors in the
nextcloud log. This patch catches the specific exception and logs it as
warnings. So for a production instance the error won't spam their logs
for this non-recoverable and technically unsolvable error if the minimum
log level is set to the default of 3 (error).

Signed-off-by: Christoph Wurst <[email protected]>
@ChristophWurst
Copy link
Member Author

/backport to stable20

@ChristophWurst
Copy link
Member Author

/backport to stable19

@ChristophWurst
Copy link
Member Author

/backport to stable18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants