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

easy setup to sync within a sync folder #6654

Closed
jnweiger opened this issue Jul 13, 2018 · 7 comments
Closed

easy setup to sync within a sync folder #6654

jnweiger opened this issue Jul 13, 2018 · 7 comments
Assignees
Labels
ReadyToTest QA, please validate the fix/enhancement

Comments

@jnweiger
Copy link
Contributor

jnweiger commented Jul 13, 2018

Tested with 242~rc1 on ubuntu 18.04 and testpilotcloud version 2.6.0daily20180713 (build 9853)

DO NOT DO THAT ON A PRODUCTION SYSTEM

Expected behavior: it should not be possible to have two syncs in the same folder running at the same time.

Observed: It is quite easy to do so, one client is sufficient. Havoc results, replicating the same folders inside the toplevel folder again and again, probably until MAXPATHLEN or diskquota are exhausted.

Reproduce:

  • Start testpilotcloud &
  • Connect to demo.owncloud.org user demo.
  • Choose what to sync: [x] Documents 35kb, everything else unchecked.
  • Wait until sync completes. Quit the client from the tray menu.
  • rm -rf ~/testpilotcloud
  • start testpilotcloud & and notice the expected error message:
    grafik
  • click 'Add Folder sync connection', confirm the suggested local folder /home/USERNAME/testpilotcloud
  • Click on Documents -> Next -> Add Sync Connection

Now we have two active sync connections. The client window alternates between

grafik
and
grafik

The top level folder gets synced into the Documents folder with every rediscovery loop, generating a deep hierarchy of

ll testpilotcloud/Documents/Documents/Documents/Documents/Documents/
insgesamt 4968
drwxr-xr-x 4 testy testy    4096 Jul 13 19:32  ./
drwxr-xr-x 4 testy testy    4096 Jul 13 19:31  ../
drwxr-xr-x 2 testy testy    4096 Jul 13 19:32  Documents/
-rw-r--r-- 1 testy testy   36227 Jul 13 19:02  Example.odt
-rw-r--r-- 1 testy testy 5017133 Jul 13 19:02 'ownCloud Manual.pdf'
drwxr-xr-x 2 testy testy    4096 Jul 13 19:32  Photos/

There are two .sync*.db datastructures in the same folder. Both active

ls -la ~/testpilotcloud
total 5360
drwxr-xr-x  4 testy testy    4096 Jul 13 19:37  ./
drwx------ 33 testy testy   12288 Jul 13 19:29  ../
-rw-r--r--  1 testy testy  118784 Jul 13 19:37  ._sync_943bac99edd8.db
-rw-r--r--  1 testy testy   32768 Jul 13 19:37  ._sync_943bac99edd8.db-shm
-rw-r--r--  1 testy testy       0 Jul 13 19:37  ._sync_943bac99edd8.db-wal
-rw-r--r--  1 testy testy  114688 Jul 13 19:36  ._sync_f3502dd50375.db
-rw-r--r--  1 testy testy   32768 Jul 13 19:36  ._sync_f3502dd50375.db-shm
-rw-r--r--  1 testy testy       0 Jul 13 19:36  ._sync_f3502dd50375.db-wal
-rw-r--r--  1 testy testy   32080 Jul 13 19:37  .owncloudsync.log
drwxr-xr-x  4 testy testy    4096 Jul 13 19:29  Documents/
-rw-r--r--  1 testy testy   36227 Jul 13 19:02  Example.odt
drwxr-xr-x  2 testy testy    4096 Jul 13 19:29  Photos/
-rw-r--r--  1 testy testy 5017133 Jul 13 19:02 'ownCloud Manual.pdf'

DO NOT DO THAT ON A PRODUCTION SYSTEM

@jnweiger
Copy link
Contributor Author

A deadlock error can be seen when quitting and restarting the client. It goes away after a few seconds, and folder replication continues....
grafik

@ogoffart ogoffart assigned ogoffart and unassigned guruz Jul 16, 2018
@ogoffart
Copy link
Contributor

Well, we can't prevent the user to do every stupid things.

We could guard against syncing a folder or one of its subfolder which is already shared with a local folder or one of its parent folder of the same account.

This would catch some of these wierd issues. There would still be ways to introduce loops with other accounts, but we IMHO don't need to go to great length to prevent that.

@jnweiger
Copy link
Contributor Author

jnweiger commented Jul 16, 2018

I found it "too easy", because the user interface seems to guide me into that situation. I know that a 'Add Folder Sync Connection' is something different. But I fear that most users don't realize that, when they see
the red error message 'Unable to find the local sync folder' and directly below a friedly button offering 'Add Folder Sync Connection' -- seems to be the perfect fit, but then explodes ...

@ogoffart
Copy link
Contributor

@jnweiger Unrelated, but your screenshot do not have the '...' icon. Seems like the svg plugin is missing.

ogoffart added a commit that referenced this issue Jul 16, 2018
…er points to deleted folders

Note that we also needed to adjust the server url to contains the user name
in the folder wizard. (As checkPathValidityForNewFolder expect the user name)

Issue #6654
@ogoffart ogoffart added the ReadyToTest QA, please validate the fix/enhancement label Jul 16, 2018
@ogoffart
Copy link
Contributor

The logic to avoid this kind of problem was already there. But it did not work correctly when there was existing folder with deleted directory. Fixed in #6656

ogoffart added a commit that referenced this issue Jul 16, 2018
…er points to deleted folders

Note that we also needed to adjust the server url to contains the user name
in the folder wizard. (As checkPathValidityForNewFolder expect the user name)

Issue #6654
ogoffart added a commit that referenced this issue Jul 17, 2018
…er points to deleted folders

Note that we also needed to adjust the server url to contains the user name
in the folder wizard. (As checkPathValidityForNewFolder expect the user name)

Issue #6654
ogoffart added a commit that referenced this issue Jul 17, 2018
…er points to deleted folders

Note that we also needed to adjust the server url to contains the user name
in the folder wizard. (As checkPathValidityForNewFolder expect the user name)

Issue #6654
@jnweiger
Copy link
Contributor Author

jnweiger commented Aug 1, 2018

@ogoffart looks like I can run two owncloud clients in parallel in the same sync folder now.
But my setup is strange, I'll have to reproduce that on a fresh install.

@jnweiger
Copy link
Contributor Author

jnweiger commented Nov 6, 2018

test under Ubuntu 18.10

running owncloud 2.5.1rc2

sync folder /home/testy/ownCloud, -> removed.
the restarted client suggests /home/testy/ownCloud2 -> OK
editing the path to say e.g. /home/testy/ownCloud2/Documents causes a friendly warning -> OK
image

The [Next] button is grayed out -> OK

All this while the sync folder /home/testy/ownCloud does not exist

PASS

@jnweiger jnweiger closed this as completed Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ReadyToTest QA, please validate the fix/enhancement
Projects
None yet
Development

No branches or pull requests

3 participants