Skip to content

Disable ext storage provider app must keep mount point #26538

Closed

Description

@PVince81

Steps

  1. Setup WND from EE (or any other app that provides a custom external storage backend/storage)
  2. Setup a mount point "/mount" with WND (or the other storage)
  3. Access the mount point "/mount" and see that files appear
  4. Disable the WND app (or other app)
  5. Access the mount point again

Expected result

Mount point exists but returns "storage not available" when accessing or syncing.

Actual result

Mount point disappears completely. This would cause sync clients to delete the local files for every user in the event that an app got disabled by mistake. This can happen also at update time where third party apps get disabled.

To avoid this kind of needless data loss through syncing, the mount point must stay visible but any access to it must throw StorageNotAvailableException.

Versions

Tested on 9.2 prealpha / git master.

Since we want to move many storage backends from files_external to separate apps, the probability that one of the separate app is not enabled on time gets higher and people might see their mount points disappear. Fixing this issue would help ease the migration in case the admin has not enabled the separate apps yet.

medium because there is a workaround: set OC to maintenance mode after an update and make sure to enable the missing storage apps before exiting maintenance mode.

@owncloud/qa @DeepDiver1975 @butonic

Activity

  1. added this to the milestone on Nov 3, 2016
  2. PVince81 commented on Nov 3, 2016

    @PVince81
    ContributorAuthor

    @owncloud/filesystem

  3. PVince81 commented on Nov 3, 2016

    @PVince81
    ContributorAuthor

    Looks like the storage config even disappears from the UI, not good.

    This is tricky, because the code expects a StorageConfig to be created in StoragesService::getStorageConfigFromDBMount() but if one of Backend or AuthMechanism cannot be instantiated, it discards the config.

    Some ideas:

    • return the StorageConfig but with null as backend and auth mechanism
    • return the StorageConfig with a dummy FailedBackend and FailedAuthMechanism instances
    • in any of these cases, display the config in the external storage admin page but make it read-only and deletable only.
  4. jvillafanez commented on Nov 15, 2016

    @jvillafanez
    Member

    To give a second thought, if I disable and remove the app on purpose, the files that are in the desktop client will stay even though they shouldn't be available (probably) and it's possible to keep trying to upload files there. There will be leftovers everywhere (files in the desktop client, unused data in the filecache, unused data in mobiles...)

    If we're talking about upgrades, the server should return a proper error if anyone tries to access the file, something like "ownCloudUpgradingException", so clients know the server is being upgraded and can respond accordingly.

    There is the additional topic of what to do if the app is incompatible with the new version...

    The problem of using the "StorageNotAvailableException" is that the clients won't know what is the real reason of the error: is there a temporal network failure between ownCloud and the backend? did the connector disappear? is ownCloud being updated?

    If there is a temporal network failure, clients can try another folder, but if ownCloud is being updated is pointless to keep syncing.

  5. butonic commented on Dec 6, 2016

    @butonic
    Contributor

    Maybe using the Retry-After header makes sense. Hm we could use it to tell the clients how often to do a PROPFIND. Even dynamically based on server load. And I agree that something like a 'MaintenanceException' in a 503 Service Unavailable with the Retry After header makes sense.

  6. PVince81 commented on Dec 6, 2016

    @PVince81
    ContributorAuthor

    To give a second thought, if I disable and remove the app on purpose, the files that are in the desktop client will stay even though they shouldn't be available (probably) and it's possible to keep trying to upload files there. There will be leftovers everywhere (files in the desktop client, unused data in the filecache, unused data in mobiles...)

    If that's what the admin decided, then the admin can also manually delete the matching storages from the config.

    If we're talking about upgrades, the server should return a proper error if anyone tries to access the file, something like "ownCloudUpgradingException", so clients know the server is being upgraded and can respond accordingly.

    Not directly. This is mostly for the case where for example the FTP app was available in OC < 9.2 with respective storages but then when upgrading to 9.2 it has been moved to the market, so the admin might need to manually reinstall it. (unless we can do this automatically, somehow)

    The problem of using the "StorageNotAvailableException" is that the clients won't know what is the real reason of the error: is there a temporal network failure between ownCloud and the backend? did the connector disappear? is ownCloud being updated?

    Yeah, I guess in general (and separately) we could add more subclasses of StorageNotAvailableException which specify what kind of error it is with a proper exception message. And then depending on it also incorporate @butonic's Retry-After idea. But this is out of the scope of this ticket as it's not the problem I'm trying to solve.

  7. self-assigned this
    on Dec 8, 2016
  8. modified the milestones: 10.0.1, 10.0 on Apr 26, 2017
  9. removed their assignment
    on May 2, 2017
  10. modified the milestones: 10.0.2, 10.0.1 on May 2, 2017
  11. modified the milestones: 10.0.2, 10.0.3 on May 26, 2017
  12. self-assigned this
    on May 31, 2017
  13. added
    p2-high
    on Jul 3, 2017
  14. PVince81 commented on Jul 10, 2017

    @PVince81
    ContributorAuthor

    Estimate: 0.5-2 md as I need some time to dive into this again. Shortest estimate is if we keep the current approach and if it still works after rebase.

  15. PVince81 commented on Aug 3, 2017

    @PVince81
    ContributorAuthor

    moving to triage to reconsider later...

  16. modified the milestones: triage, development on Aug 3, 2017
  17. removed this from the triage milestone on Apr 10, 2018
  18. lock commented on Jul 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  19. locked as resolved and limited conversation to collaborators on Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type:Bugapp:files_externalp2-highsev3-mediumstatus/STALE

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions