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 StorageNotAvailableException while formatting the share #38190

Merged
merged 2 commits into from
Dec 4, 2020

Conversation

jvillafanez
Copy link
Member

The getById method called while formatting could go down to the storage
if somehow the node needs to be updated. If so, the storage where the
node is could not be available, causing the exception to pop up.
Such exception causes the list of shares to be broken since it wasn't
being caught.

Description

Catch a possible StorageNotAvailableException that could be thrown while formatting the shares.
This specially affects to the share listing, which could be broken and the UI might not show any local share if such exception happens.

So far, this has been detected only while listing the shares, and the steps to reproduce aren't fully clear. There are some other locations for the formatShare method being called, although it's expected to behave better since other similar exception that could happen such as NotFoundException aren't being handled in those places.

Related Issue

Related to https://github.com/owncloud/enterprise/issues/4250

Motivation and Context

Could lead to an empty list of shares

How Has This Been Tested?

Not tested yet

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • 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 ticket raised:
  • Changelog item, see TEMPLATE

The getById method called while formatting could go down to the storage
if somehow the node needs to be updated. If so, the storage where the
node is could not be available, causing the exception to pop up.
Such exception causes the list of shares to be broken since it wasn't
being caught.
@update-docs
Copy link

update-docs bot commented Dec 3, 2020

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@cdamken
Copy link
Contributor

cdamken commented Dec 3, 2020

Works with Damken-Cloud!

karakayasemi
karakayasemi previously approved these changes Dec 3, 2020
@karakayasemi
Copy link
Contributor

We need changelog entry before merge.

@karakayasemi karakayasemi dismissed their stale review December 3, 2020 14:56

Need changelog entry

@jvillafanez
Copy link
Member Author

I assume we don't need to rush so this will be in 10.7. I haven't been able to reproduce the scenario locally, so maybe the conditions to reach the issue cannot happen in the recent versions.

@jvillafanez jvillafanez force-pushed the notavailable_while_formatting branch from f38688c to fc3eaea Compare December 4, 2020 10:20
@jvillafanez
Copy link
Member Author

Added changelog item

@sonarcloud
Copy link

sonarcloud bot commented Dec 4, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@phil-davis phil-davis merged commit b08018c into master Dec 4, 2020
@delete-merged-branch delete-merged-branch bot deleted the notavailable_while_formatting branch December 4, 2020 13:14
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.

4 participants