Unsubscribing a folder should stop all queued activity on that folder

Bug #576080 reported by Joshua Hoover
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Confirmed
Medium
Ubuntu One Foundations+ team

Bug Description

When a user selects to unsubscribe (right-click on folder and select "Stop synchronizing on Ubuntu One"), syncdaemon should stop processing that folder and unsubscribe the folder immediately. Otherwise, the user could be stuck waiting for syncdaemon to finish scanning and processing files he doesn't want processed anymore. This takes up computer resources and bandwidth the user doesn't want to waste. This is especially true in cases where a user selects to sync a large folder (both in number and size of files) and decides they want to stop syncing.

----------------------------------

WORKAROUND:
1. In a terminal session (Applications->Accessories->Terminal) run: u1sdtool --list-folders
2. Copy the ID of the folder you want to stop synchronizing
3. In a terminal session run (replacing ID-COPIED-FROM-STEP-2): u1sdtool -q; u1sdtool --start; u1sdtool --delete-folder=ID-COPIED-FROM-STEP-2; u1sdtool -c

Note, syncdaemon will do a local rescan of the folder you unsubscribed (stopped syncing) which means it will take some time processing this folder one last time, but will not attempt to do a sync. After that, the folder will no longer be processed.

----------------------------------

STEPS TO TEST:
1. Right-click on empty folder in ~/ and select "Synchronize on Ubuntu One"
2. Copy a lot files (say, 1 GB worth of music) to the folder
3. Open a terminal session and run:
u1sdtool --list-folders
4. Copy the ID of the folder selected to sync with Ubuntu One in step 1
5. In a terminal session run:
u1sdtool --unsubscribe-folder=ID-FROM-STEP-4
6. Wait a minute and then run:
u1sdtool --list-folders

Result: u1sdtool --list-folders lists the folder subscribed in step 1 as subscribed=True and all syncdaemon activity on that folder stops

Expected result: u1sdtool --list-folders lists the folder subscribed in step 1 as subscribed=False (or blank) and all syncdaemon activity on that folder has stopped

description: updated
Revision history for this message
Christopher Lloyd (ubuntu-chrislloyd) wrote :

I've tried the above commands with no success.

chris@chris-desktop:~$ u1sdtool --list-folders
Folder list:
  id=a36a54ee-dbdd-4d7a-b0ed-b8effba3764e subscribed= path=/home/chris/Music
  id=03a5f837-543a-4a33-95ad-1213113b03f6 subscribed=True path=/home/chris/Documents
  id=fc4c7fa5-8796-4b96-b566-4955ab2ec71d subscribed=True path=/home/chris/.ubuntuone/Purchased from Ubuntu One
chris@chris-desktop:~$ u1sdtool -q
ubuntuone-syncdaemon stopped.
chris@chris-desktop:~$ u1sdtool --start
chris@chris-desktop:~$ u1sdtool --unsubscribe-folder=a36a54ee-dbdd-4d7a-b0ed-b8effba3764e
chris@chris-desktop:~$ u1sdtool -c
chris@chris-desktop:~$ u1sdtool --status
State: SERVER_RESCAN
    connection: With User With Network
    description: doing server rescan
    is_connected: True
    is_error: False
    is_online: False
    queues: WORKING_ON_METADATA

chris@chris-desktop:~$ u1sdtool --list-folders
Folder list:
  id=a36a54ee-dbdd-4d7a-b0ed-b8effba3764e subscribed= path=/home/chris/Music
  id=03a5f837-543a-4a33-95ad-1213113b03f6 subscribed=True path=/home/chris/Documents
  id=fc4c7fa5-8796-4b96-b566-4955ab2ec71d subscribed=True path=/home/chris/.ubuntuone/Purchased from Ubuntu One
chris@chris-desktop:~$ u1sdtool --status
State: QUEUE_MANAGER
    connection: With User With Network
    description: processing queues
    is_connected: True
    is_error: False
    is_online: True
    queues: IDLE

chris@chris-desktop:~$ u1sdtool --list-folders
Folder list:
  id=a36a54ee-dbdd-4d7a-b0ed-b8effba3764e subscribed= path=/home/chris/Music
  id=03a5f837-543a-4a33-95ad-1213113b03f6 subscribed=True path=/home/chris/Documents
  id=fc4c7fa5-8796-4b96-b566-4955ab2ec71d subscribed=True path=/home/chris/.ubuntuone/Purchased from Ubuntu One
chris@chris-desktop:~$

Revision history for this message
Joshua Hoover (joshuahoover) wrote :

Hi Christopher,

I had the same problem. As it turns out, u1sdtool --list-folders returns all previously synced folders. If the folder is being synced, it is reported as "subscribed=True", if not it reports "subscribed=". Yes, that's a bug too. We should show subscribed=False at the very least. I'll be filing a separate bug for that so it can get fixed (sooner). So, your ~/Music folder is no longer being synchronized by Ubuntu One. If you think it's still processing those files, can you attach the following log file to this bug report so I can get a better feel for what might be going on? ~/.cache/ubuntuone/log/syncdaemon.log

Thank you,

Joshua

Revision history for this message
Christopher Lloyd (ubuntu-chrislloyd) wrote :

Okay thanks. Parts of this folder are still on the webservice taking up space. How do I remove the folder from my U1 account?

This may be a duplicate of this bug: https://answers.launchpad.net/ubuntuone-client/+question/108692

But the answer is not applicable to me. I have already unsynced the folder and I can't delete it.

Revision history for this message
Joshua Hoover (joshuahoover) wrote :

Hi Chris,

Please do the following and let me know if the files continue to take up space in your cloud storage:

u1sdtool --delete-folder=a36a54ee-dbdd-4d7a-b0ed-b8effba3764e

It may take a little while for this to process on between the client and the server, but you should no longer see that folder or any files taking up space after that runs completely.

Thank you,

Joshua

Revision history for this message
Christopher Lloyd (ubuntu-chrislloyd) wrote :

It took a bunch of tries and some quitting and restarting of the U1 service but it finally worked and my U1 account has now been freed up. Thanks a ton for getting this to work.

Revision history for this message
Joshua Hoover (joshuahoover) wrote :

Hi Chris,

Finally! Thank you SO much for your patience and effort on this one. I'm targetting this one to get fixed for Maverick. I'll be sure to update the workaround steps to use the --delete-folder since that is what most people in this situation will want to do.

Thank you,

Joshua

description: updated
Revision history for this message
ChrisDesjardins (cddesjardins) wrote :

Hi Joshua,
Are there ways of backporting this fix to lucid? I'd prefer to stick with the LTS releases and having this fix backported would be really nice.

Revision history for this message
grigori (gexi-deactivatedaccount) wrote :

well i have a huge problem with this bug.

actually, in maverick and lucid it's pretty easy to share a folder by wrong clicking, which i did (got a laptop, using touchpad for the first time;). unfortunatly, the concerned folder had really lots of video-files in it, all together about 60gb.

so i immediatly tried to stop syncing by unchecking the ›sync with u1‹ option. after a few attempts i figured it wouldn't work. so i found this bug here. tried the steps from the workaround. had the --delete-folder option even running over night for about six hours. nothing happened. i got to the conclusion that the scanning of 60gig's might just take that long, so i removed the files from the shared folder. now, there's just the folder and nothing to scan or sync inside it. however, --delete-folder does not work.

would be happy if you have any suggestions. plus it would be very wise if the user was asked (in case of false-clicking) if (s)he really wants to share that folder, by a pop-up window. it's way to easy to get into this situation.

Revision history for this message
GoncaloP (goncalop) wrote :

It seems fixed on Maverick. The folders just appeared like they were on the web UI, and a simple right-click>Ubuntu One>Stop Sync deleted them instantly from the web UI, and after a few seconds, from the computer. Thank you to everyone involved in the fix!

summary: - Unsubscribing a folder should stop all activity on that folder
+ Unsubscribing a folder should stop all queued activity on that folder
Leo Arias (elopio)
tags: added: maverick
removed: u1-maverick
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.