Skip to content

Shares from ext storage lost after upgrade stable8->master #15641

Closed

Description

@PVince81

Steps to reproduce

  1. Setup stable8 (8.0.3RC1)
  2. Create three users "root", "user1", "user2" (root is the admin)
  3. Mount a SFTP external storage globally (apply to all) to "/global"
  4. Mount another SFTP external storage locally (persona) to "/local"
  5. Share "global" with "user1"
  6. Share "local" with "user1"
  7. Create a folder "global/subglobal" and share it with "user2"
  8. Create a folder "local/subglobal" and share it with "user2"
  9. Upgrade to master (1a24752), the upcoming 8.1

Expected result

Shares still visible after upgrade

Actual result

Shares not visible any more, neither for sharer nor recipient.
Shares are still in "oc_share" table. I suspect a fileid change.

Versions

Upgrading from stable8 (9dac69b) to master (1a24752)

Activity

  1. added this to the milestone on Apr 15, 2015
  2. self-assigned this
    on Apr 15, 2015
  3. PVince81 commented on Apr 15, 2015

    @PVince81
    ContributorAuthor

    I'll debug this

  4. PVince81 commented on Apr 15, 2015

    @PVince81
    ContributorAuthor

    Just tested upgrading stable7->stable8 and shares are kept.
    So this is a regression.

  5. PVince81 commented on Apr 15, 2015

    @PVince81
    ContributorAuthor

    Ok, it looks like the SFTP storage id format has changed:

    Before:

    +-----------------------------------------------------------+--------+-------+------+------------+---------------+---------------+-------------+
    | id                                                        | fileid | path  | size | mtime      | storage_mtime | etag          | permissions |
    | sftp::vincent@localhost//home/vincent/temp/sftpmount/  |      9 |       |    0 | 1429105560 |    1429105560 | 552e6daaf0d96 |          31 |
    | sftp::vincent@localhost//home/vincent/temp/sftpmount/  |     17 | files |  163 | 1429106115 |    1429106115 | 552e6dc3808b5 |          31 |
    | sftp::vincent@localhost//home/vincent/temp/sftpmount/  |     23 | files |  163 | 1429106326 |    1429106326 | 552e6e96142f8 |          31 |
    | sftp::vincent@localhost//home/vincent/temp/sftpmount/  |      3 | files |  163 | 1429106087 |    1429106048 | 552e6da7eb6ad |          31 |
    | sftp::vincent@localhost//home/vincent/temp/sftpmount2/ |     10 |       |    0 | 1429105552 |    1429105552 | 552e6dab1d246 |          31 |
    | sftp::vincent@localhost//home/vincent/temp/sftpmount2/ |      3 | files |  163 | 1429106087 |    1429106048 | 552e6da7eb6ad |          31 |
    | sftp::vincent@localhost//home/vincent/temp/sftpmount2/ |     17 | files |  163 | 1429106115 |    1429106115 | 552e6dc3808b5 |          31 |
    | sftp::vincent@localhost//home/vincent/temp/sftpmount2/ |     23 | files |  163 | 1429106326 |    1429106326 | 552e6e96142f8 |          31 |
    

    After:

    +-----------------------------------------------------------+--------+-------+------+------------+---------------+---------------+-------------+
    | id                                                        | fileid | path  | size | mtime      | storage_mtime | etag          | permissions |
    | sftp::vincent@localhost:22//home/vincent/temp/sftpmount/  |     30 |       |    0 | 1429106459 |    1429105560 | 552e6f1b405cf |          23 |
    | sftp::vincent@localhost:22//home/vincent/temp/sftpmount/  |     23 | files |  163 | 1429106326 |    1429106326 | 552e6e96142f8 |          31 |
    | sftp::vincent@localhost:22//home/vincent/temp/sftpmount/  |     17 | files |  163 | 1429106115 |    1429106115 | 552e6dc3808b5 |          31 |
    | sftp::vincent@localhost:22//home/vincent/temp/sftpmount/  |      3 | files |  163 | 1429106459 |    1429106048 | 552e6f1b3f9df |          31 |
    | sftp::vincent@localhost:22//home/vincent/temp/sftpmount2/ |     31 |       |   -1 | 1429105552 |    1429105552 | 552e6f1b1fcc2 |          23 |
    | sftp::vincent@localhost:22//home/vincent/temp/sftpmount2/ |     23 | files |  163 | 1429106326 |    1429106326 | 552e6e96142f8 |          31 |
    | sftp::vincent@localhost:22//home/vincent/temp/sftpmount2/ |     17 | files |  163 | 1429106115 |    1429106115 | 552e6dc3808b5 |          31 |
    | sftp::vincent@localhost:22//home/vincent/temp/sftpmount2/ |      3 | files |  163 | 1429106459 |    1429106048 | 552e6f1b3f9df |          31 |
    

    Changing the storage id would recreate a new storage instance, which obviously would also get a new fileid...
    Not sure if this is specific to SFTP.

    CC @Xenopathic @icewind1991 @MorrisJobke

  6. PVince81 commented on Apr 15, 2015

    @PVince81
    ContributorAuthor

    I'll prepare the following fix: if the port is "22", we must NOT add it to the id to avoid changing old ids.

  7. PVince81 commented on Apr 15, 2015

    @PVince81
    ContributorAuthor

    This is another reason why we need a proper mapping table: #11830

  8. PVince81 commented on Apr 15, 2015

    @PVince81
    ContributorAuthor

    Fix is here: #15644

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions