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

Moving files makes them disappear (SWIFT object store) #15702

Closed
pvancald opened this issue Apr 17, 2015 · 34 comments
Closed

Moving files makes them disappear (SWIFT object store) #15702

pvancald opened this issue Apr 17, 2015 · 34 comments

Comments

@pvancald
Copy link

Steps to reproduce

  1. via the webinterface
  2. Create a subfolder in an existing folder
  3. Move a file from current folder to the freshly created subfolder

Expected behaviour

The freshly moved file should be visible in the subfolder

Actual behaviour

The file is not visible and the logs of the desktop client indicates that it has been deleted.

Server configuration

Operating system: Redhat 6.4

Web server: Apache

Database: EnterpriseDB (PostgreSQL)

PHP version: 5.6.2

ownCloud version: 8.0.2

Updated from an older ownCloud or fresh install: Updated from fresh 8.0.7

List of activated apps:

  • activity
  • calendar
  • contacts
  • files
  • files_external
  • files_locking
  • files_pdfviewer
  • files_sharing
  • files_texteditor
  • files_trashbin
  • files_versions
  • files_videoviewer
  • firstrunwizard
  • gallery
  • provisioning_api
  • templateeditor
  • updater
  • user_external

Disabled:

  • bookmarks
  • documents
  • external
  • files_encryption
  • user_ldap
  • user_webdavauth

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' =>
  array (
    0 => '192.168.14.XXX',
    1 => '192.168.14.XXX',
    2 => '192.168.14.XXX',
    3 => '192.168.14.XXX',
    4 => 'oc.XXX.be',
    5 => 'o.XXX.be',
  ),
  'datadirectory' => '/var/www/html/owncloud/data',
  'overwrite.cli.url' => 'https://o.XXX.be/owncloud/',
  'installed' => true,
  'version' => '8.0.2.0',
  'forcessl' => true,
  'forceSSLforSubdomains' => true,
  'dbtype' => 'pgsql',
  'dbname' => 'PGOWNCLOUD',
  'dbhost' => '192.168.14.XXX',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'XXX',
  'dbpassword' => 'XXX',
  'objectstore' =>
  array (
    'class' => 'OC\\Files\\ObjectStore\\Swift',
    'arguments' =>
    array (
      'username' => 'XXX',
      'password' => 'XXX',
      'container' => 'XXX',
      'autocreate' => true,
      'region' => 'regionOne',
      'url' => 'http://s2.XXX.lan:5000/v2.0',
      'tenantName' => 'owncloud',
      'serviceName' => 'swift',
    ),
  ),
  'user_backends' =>
  array (
    0 =>
    array (
      'class' => 'OC_User_IMAP',
      'arguments' =>
      array (
        0 => '{mailbox.XXX.be:993/imap/ssl}INBOX',
      ),
    ),
  ),
  'theme' => '',
  'maintenance' => false,
  'loglevel' => 2,
);

Are you using external storage, if yes which one: Swift

Are you using encryption: No

Are you using an external user-backend, if yes which one: IMAP

Client configuration

Browser: Chrome

Operating system: Windows 7

Logs

ownCloud log (data/owncloud.log)

{"reqId":"5f446c3817ed232afbc10b844dcadf93","remoteAddr":"192.168.203.112","app":"sharing","message":"No fileinfo available for: \/Documents\/Lifecycle.png","level":2,"time":"2015-03-31T13:36:41+00:00","method":"POST","url":"\/owncloud\/index.php\/apps\/files\/ajax\/move.php"}

ownCloud Desktop client log

Line 70: 03-31 15:37:06:070 0x433b520 OCC::SocketApi::command_RETRIEVE_FILE_STATUS: void OCC::SocketApi::command_RETRIEVE_FILE_STATUS(const QString&, OCC::SocketType*) "C:\Users\pvancaldenborgh\ownCloud\Lifecycle.png"
Line 71: 03-31 15:37:06:071 0x433b520 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:OK:C:\Users\XXX\ownCloud\Lifecycle.png"
Line 297: 03-31 15:37:08:656 0x7239374 csync_ftw: Uniq ID from Database: Lifecycle.png -> 551aa2b0e33ab
Line 298: 03-31 15:37:08:656 0x7239374 csync_walker: file: C:/Users/XXX/ownCloud/Lifecycle.png [inode=30438 size=225286]
Line 300: 03-31 15:37:08:656 0x7239374 _csync_detect_update: file: Lifecycle.png, instruction: INSTRUCTION_NONE <<=
Line 389: 03-31 15:37:08:719 0x433b520 OCC::SocketApi::command_RETRIEVE_FILE_STATUS: void OCC::SocketApi::command_RETRIEVE_FILE_STATUS(const QString&, OCC::SocketType*) "C:\Users\XXX\ownCloud\Lifecycle.png"
Line 390: 03-31 15:37:08:719 0x433b520 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:OK:C:\Users\XXX\ownCloud\Lifecycle.png"
Line 488: 03-31 15:37:09:124 0x433b520 _csync_merge_algorithm_visitor: INSTRUCTION_REMOVE   file: Lifecycle.png
Line 544: 03-31 15:37:09:140 0x433b520 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:SYNC:C:\Users\XXX\ownCloud\Lifecycle.png"
Line 555: 03-31 15:37:09:795 0x433b520 OCC::OwncloudPropagator::localFileNameClash: CaseClashCheck for  "C:/Users/XXX/ownCloud/Lifecycle.png"
Line 556: 03-31 15:37:09:795 0x433b520 OCC::SyncJournalDb::deleteFileRecord: "DELETE FROM metadata WHERE phash=?1" 9051815921365099374 "Lifecycle.png"
Line 558: 03-31 15:37:09:795 0x433b520 OCC::SyncEngine::slotJobCompleted: void OCC::SyncEngine::slotJobCompleted(const OCC::SyncFileItem&) "Lifecycle.png" INSTRUCTION_REMOVE 4 ""
Line 559: 03-31 15:37:09:795 0x433b520 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:OK:C:\Users\XXX\ownCloud\Lifecycle.png"
Line 560: 03-31 15:37:09:795 0x71c57a8 OCC::WatcherThread::watchChanges: void OCC::WatcherThread::watchChanges(size_t, bool*) Found change in "C:/Users/XXX/ownCloud/Lifecycle.png" action: 2
Line 561: 03-31 15:37:09:796 0x433b520 OCC::FolderWatcher::changeDetected: detected changes in paths: QSet("C:/Users/XXX/ownCloud/Lifecycle.png")
Line 564: 03-31 15:37:09:796 0x433b520 OCC::Folder::watcherSlot: void OCC::Folder::watcherSlot(QString) Sync running, IGNORE event for  "C:/Users/XXX/ownCloud/Lifecycle.png"
Line 633: 03-31 15:37:10:468 0x433b520 OCC::SocketApi::command_RETRIEVE_FILE_STATUS: void OCC::SocketApi::command_RETRIEVE_FILE_STATUS(const QString&, OCC::SocketType*) "C:\Users\XXX\ownCloud\Lifecycle.png"
Line 634: 03-31 15:37:10:469 0x433b520 OCC::SocketApi::fileStatus: OO File  "C:/Users/XXX/ownCloud/Lifecycle.png"  is not existing
Line 635: 03-31 15:37:10:469 0x433b520 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:ERROR:C:\Users\XXX\ownCloud\Lifecycle.png"
Line 951: 03-31 15:37:13:639 0x433b520 OCC::SocketApi::command_RETRIEVE_FILE_STATUS: void OCC::SocketApi::command_RETRIEVE_FILE_STATUS(const QString&, OCC::SocketType*) "C:\Users\XXX\ownCloud\Lifecycle.png"
Line 952: 03-31 15:37:13:639 0x433b520 OCC::SocketApi::fileStatus: OO File  "C:/Users/XXX/ownCloud/Lifecycle.png"  is not existing
Line 953: 03-31 15:37:13:639 0x433b520 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:ERROR:C:\Users\XXX\ownCloud\Lifecycle.png"
Line 1172: 03-31 15:37:15:129 0x433b520 OCC::SocketApi::command_RETRIEVE_FILE_STATUS: void OCC::SocketApi::command_RETRIEVE_FILE_STATUS(const QString&, OCC::SocketType*) "C:\Users\XXX\ownCloud\Lifecycle.png"
Line 1173: 03-31 15:37:15:129 0x433b520 OCC::SocketApi::fileStatus: OO File  "C:/Users/XXX/ownCloud/Lifecycle.png"  is not existing
Line 1174: 03-31 15:37:15:130 0x433b520 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:ERROR:C:\Users\XXX\ownCloud\Lifecycle.png"
@rullzer
Copy link
Contributor

rullzer commented Apr 19, 2015

@pvancald Did this happen using the webinterface? Or did it happen using the desktop client?

@pvancald
Copy link
Author

Hi,
the behaviour is the same either using the webinterface or the folder with
the desktop client.
The attached logs were for a move operation via the webinterface (drag and
drop of the file to the subfolder)

For completion, I also tried a scan of all files with the occ command and
the missing files do not re-appear.

On 19 April 2015 at 17:31, Roeland Douma notifications@github.com wrote:

@pvancald https://github.com/pvancald Did this happen using the
webinterface? Or did it happen using the desktop client?


Reply to this email directly or view it on GitHub
#15702 (comment).


Pascal Van Caldenborgh
Chef de projet et Architecte IT

@PVince81
Copy link
Contributor

I see you're using the SWIFT object store as home storage, tagging as such

@beejee
Copy link

beejee commented May 21, 2015

Hi,
do you have any input on this issue, ways we can debug this, logs you would like to see?
Can this be related to this issue: #11797?
as in: the file is being renamed on swift level, oc not picking up the new file so cancelling the move , not registering the new location in the db metadata, hence the db location being different from the actual file location?

The files are still available when we look on the actual swift storage after the move
They don't reappear with a "occ files:scan --all" though.

@pvancald
Copy link
Author

Hi!
we updated to 8.0.3 recently and the issue is still present...
today we have a fresh eye working on it and I asked him to contribute as well to this issue.
Our engineer and the consultant are more aware than I am to continue feeding on the investigations but from what I read on issue #11797 it really sounds related...

@beejee
Copy link

beejee commented May 21, 2015

From what it looks like, the move (which is a copy/delete action in the swift storage) processes on swift level. The db metadata is not updated though, which could be because owncloud does not see an updated mtime on the directory containing the moved/new file so it does not pick up the new file in the new location.

Can we get more details or debug info out of owncloud on these actions happening when files are moved from a folder?

(btw I am the fresh eye :), last week we received a report of another location having similar problems with a swift setup as main storage but they proceeded with another form of storage for now)

@motomura0770
Copy link

I have also encountered this bug.
This bug is encountered from ver 8.0.1.
Ver 8.0.0 is no problem.

@diegoparrilla
Copy link

I can confirm the bug in 8.0.3

@motomura0770
Copy link

I tested ver 8.1 with "Transactional File Locking" setting.
However, the bug was also confirmed.
(CentOS7, Swift)

Transactional File Locking setting was done following URL.
(wrong 'memcache.local' -> 'memcache.locking' ?)
(Comma is missing. -> '/tmp/redis.sock' ?)

https://doc.owncloud.org/server/8.1/admin_manual/configuration_files/files_locking_experimental.html

@PVince81
Copy link
Contributor

@motomura0770 thanks, I raised owncloud-archive/documentation#1314 to fix the doc.

Did you check the admin page and see in the "Server status" section that locking was enabled properly ?

@motomura0770
Copy link

Yes.
"Transactional File Locking is enabled. " is shown.

@PVince81
Copy link
Contributor

@motomura0770 can you post your environment info ? See https://raw.githubusercontent.com/owncloud/core/master/issue_template.md
I suspect this might not be related to locking or concurrency.

@PVince81
Copy link
Contributor

I just saw the "objectstore" label.
Are you guys ALL using the SWIFT home object store with the "objectstore" setting in config.php ?

@PVince81 PVince81 changed the title Moving files makes them disappear Moving files makes them disappear (SWIFT object store) Jul 14, 2015
@pvancald
Copy link
Author

Yes...
my config is at the top of the post :
'objectstore' =>
array (
'class' => 'OC\Files\ObjectStore\Swift',
'arguments' =>
array (
'username' => 'XXX',
'password' => 'XXX',
'container' => 'XXX',
'autocreate' => true,
'region' => 'regionOne',
'url' => 'http://s2.XXX.lan:5000/v2.0',
'tenantName' => 'owncloud',
'serviceName' => 'swift',
),

@PVince81
Copy link
Contributor

Ah sorry, I thought you were one of the other reporters 😄

This is likely to be a bug in the SWIFT backend implementation.

@PVince81
Copy link
Contributor

@butonic any idea ?

@motomura0770
Copy link

My test environment is shown below.
I think that it is not a SWIFT's bug.
Because, when a file is deleted, ownCloud does not communicate with SWIFT (I check swift's logfiles).

Server configuration

Operating system:
CentOS7.1.1503(Core)

Web server:
apache-2.4.6

Database:
sqlite-3.7.17
#For Test Environment

PHP version:
php-5.4.16

ownCloud version: (see ownCloud admin page)
8.1.0

Updated from an older ownCloud or fresh install:
fresh install

List of activated apps:
Activity
Delete Files
First Run Wizard
Mail Template Editor
PDF Viewer
Pictures
Provisioning API
Share Files
Text Editor
Versions
Video Editor
File Locking

The content of config/config.php:

'xxxxx', 'passwordsalt' => 'xxxxx', 'secret' => 'xxxxx', 'trusted_domains' => array ( 0 => 'xxxx', ), 'datadirectory' => '/var/www/html/owncloud/data', 'overwrite.cli.url' => 'http://xxxxx/owncloud', 'dbtype' => 'sqlite3', 'version' => '8.1.0.8', 'logtimezone' => 'UTC', 'installed' => true, 'objectstore' => array ( 'class' => 'OC\Files\ObjectStore\Swift', 'arguments' => array ( 'username' => 'xxx', 'password' => 'xxxxx', 'container' => 'xxxxx', 'autocreate' => false, 'region' => 'xxxx', 'url' => 'http://xxxxx/v2.0', 'tenantName' => 'xxxx', 'serviceName' => 'xxxx', ), ), 'filelocking.enabled' => 'true', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => '127.0.0.1', // can also be a unix domain socket: '/tmp/redis.sock', 'port' => 6379, 'timeout' => 0.0, // Optional, if undefined SELECT will not run and will use Redis // Server's default DB Index. 'dbindex' => 0, ), ); **Are you using external storage, if yes which one:** local/smb/sftp/... swift-1.12 **Are you using encryption:** yes/no no **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... no

@motomura0770
Copy link

I wrote wrong description.
Correctly it is as follows.

When a file is moved to trash, ownCloud does not communicate with SWIFT (I check swift's logfiles).

@carlaschroder
Copy link

Will someone confirm that 'memcache.locking' is the correct parameter? Because the core config.sample.php file also uses 'memcache.local''

@carlaschroder
Copy link

Tested and fixed in docs. owncloud-archive/documentation#1321

@motomura0770
Copy link

I can confirm the bug fix with ##17641.

@butonic
Copy link
Member

butonic commented Sep 29, 2015

#17641 breaks several unit tests, #19414 adds swift objectstore testing based on ceph / keystone / docker

@butonic
Copy link
Member

butonic commented Sep 29, 2015

cc @karlitschek

@butonic
Copy link
Member

butonic commented Sep 29, 2015

cc @cmonteroluque

@ghost
Copy link

ghost commented Sep 30, 2015

@butonic Not sure about the labels, either regression or sev1. It has no milestone and a sev1 with no milestone is definitely an oddity. Let's talk about what's driving this and determine what's next. @bboule @karlitschek @MTRichards @DeepDiver1975

@karlitschek
Copy link
Contributor

hmm. If this is confirmed then I would call this a sev1 for 8.2 (data loss)

@butonic
Copy link
Member

butonic commented Sep 30, 2015

I just did not assign a milestone. It is a regression because moving worked when objectstore was introduced.

@butonic
Copy link
Member

butonic commented Oct 7, 2015

@cmonteroluque @DeepDiver1975 so what milestone do we plan for? 8.2 or 8.2.1 or 9.0?

@ghost
Copy link

ghost commented Oct 8, 2015

As per #15702 (comment) moving it to 8.2

@ghost ghost added this to the 8.2-current milestone Oct 8, 2015
@ghost ghost assigned DeepDiver1975 Oct 11, 2015
@MorrisJobke
Copy link
Contributor

The PR we need to look in for this is #17641

@ghost
Copy link

ghost commented Oct 13, 2015

Moving to 8.2.1, it's a regression and we should have it resolved but we need more time to feel better about it

@ghost ghost modified the milestones: 8.2.1-next-maintenance, 8.2-current Oct 13, 2015
@PVince81
Copy link
Contributor

I see the PR #17641 was merged, is this fixed or is there additional work to be done ?

@butonic
Copy link
Member

butonic commented Oct 20, 2015

fixed for 9.0, backport for 8.2.1 in #19882

@butonic butonic closed this as completed Oct 20, 2015
@MorrisJobke MorrisJobke modified the milestones: 9.0-next, 8.2.1-next-maintenance Oct 20, 2015
@lock
Copy link

lock bot commented Aug 5, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests