Repository navigation
SWIFT object storage as external storage is broken in Nextcloud11 #5866
Description
Activity
cc @icewind1991
- added0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmap
on Jul 25, 2017 Is it only a problem with files that weren't added trough Nc? can you upload file (and then access those files) trough Nc?
An object store does not have a directory tree like structure. You have containers or buckets and you have objects. Nothing more. Suppose you have this on your local file system:
file1
file2dir1
- file3
- file4
- file5
dir2
- file6
Syncing this with an object store (outside of nextcloud) you should get the following objects in your container:
file1
file2
dir1/file3
dir1/file4
dir1/file5
dir2/file6When you couple the SWIFT object store with nextcloud you would only see this in the web interface:
file1
file2Nothing more.
When dealing with an object store like SWIFT, a slash in a file name is not something to be worried about. It looks like nextcloud is choking on this.
When I couple a SWIFT container to nextcloud and create files and folders through the web interface, everything is fine.
Cheers,
Ron
Basically a structure like this:
dir1
- file1
becomes the object:
dir1/file1This is still not fixed in 12.0.3. When creating a directory with a file in it in NC you see the following object in the object store:
directory/
directory/fileUploading a directory with a file in it with a tool like rclone you will get:
directory/file
and this remains unvisible in NC. However, when I created the directory "directory" in the NC web I/F, I suddenly do see:
directory/
directory/fileWhat is needed is that when uploading a directory with files in it to an object store that would create object with names like directory/file a zero-byte object is created with "Content Type: httpd/unix-directory" and the name "directory/", otherwise NC would not see the objects inside the directory.
To solve this on the client side may be difficult but on the server side it may be possible to insert such an object during a file scan if it does not exist already.
I have done some more investigation. SWIFT has these pseudo-hierarchical folders. Clients fail to implement this consistently.
Uploading a directory with a file in it (directory/file), you see the following:
rclone gives:
directory/file
but fails to generate the directory/ object.
duck gives:
directory
directory/fileWhere "directory" has the content-type: application/directory.
Neither of the structures above are picked up by Nextcloud. However when I create zero-byte object "directory/" with a "content-type: httpd/unix-directory" myself everything is fine and I see directories and files pop up in Nextcloud.
Could Nextcloud "fix" this by assuming that when encountering object names like "directory/file" there should als be a zero-byte object named "directory/" with content-type httpd/unix-directory and create it if it does not exist?
- addedstaleTicket or PR with no recent activityTicket or PR with no recent activity
on Jun 20, 2018 Is this still happening on 16.0.1?
- added0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapstaleTicket or PR with no recent activityTicket or PR with no recent activityand removed0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapstaleTicket or PR with no recent activityTicket or PR with no recent activity
on May 27, 2019 Should work in the meantime.
This also doesn't work in v17...
Steps to reproduce
1.Mount SWIFT object storage as external storage
2.Upload a directory with files and subfolders with files in it using something like rclone. This produces output like:
ron@LLT0024:~$ swift list maersk2
1st_file.txt
2nd_file.txt
another_directory/3rd_file.txt
Expected behaviour
The following should be shown:
1st_file.txt
2nd_file.txt
another_directory
Actual behaviour
1st_file.txt
2nd_file.txt
Server configuration
Operating system:
CentOS 7.3.1611
Web server:
apache 2.4.6
Database:
mariadb-5.5
PHP version:
7.0
Nextcloud version: (see Nextcloud admin page)
11
Updated from an older Nextcloud/ownCloud or fresh install:
fresh
Where did you install Nextcloud from:
tarball
Signing status:
Signing status
No errors found
List of activated apps:
App list
Nextcloud configuration:
Config report
Enabled:
Are you using external storage, if yes which one: local/smb/sftp/...
SWIFT
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No
LDAP configuration (delete this part if not used)
LDAP config
Client configuration
Browser:
Operating system:
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
Browser log
Browser log