We're Hiring!

Using Cleanse to remove deleted files

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Using Cleanse to remove deleted files

Postby davemason » Fri Jun 13, 2014 4:00 pm

Hello OME team,

I'm running 5.0.2 on Linux and have just run a test case whereby data are uploaded, then deleted. Server side, I can navigate to the data in the binary repository.

When I run:
Code: Select all
omero admin cleanse --dry-run /data/OMERO.data/

I get the following error quite rightly pointing out that there is no Pixels directory
Code: Select all

Reconciling OMERO data directory...
/data/OMERO.data/Files
   \_ /data/OMERO.data/Files/116 (keep)
   \_ /data/OMERO.data/Files/154 (keep)
   \_ /data/OMERO.data/Files/157 (keep)
   \_ /data/OMERO.data/Files/53 (keep)
   \_ /data/OMERO.data/Files/54 (keep)
   \_ /data/OMERO.data/Files/151 (keep)
   \_ /data/OMERO.data/Files/129 (keep)
   \_ /data/OMERO.data/Files/153 (keep)
   \_ /data/OMERO.data/Files/152 (keep)
   \_ /data/OMERO.data/Files/155 (keep)
   \_ /data/OMERO.data/Files/52 (keep)
   \_ /data/OMERO.data/Files/128 (keep)
Reconciling OMERO data directory...
/data/OMERO.data/Pixels
Cleansing context: 0 files (0 bytes)
Traceback (most recent call last):
  File "/apps/omero/OMERO.server/bin/omero", line 125, in <module>
    rv = omero.cli.argv()
  File "/apps/omero/OMERO.server/lib/python/omero/cli.py", line 1242, in argv
    cli.invoke(args[1:])
  File "/apps/omero/OMERO.server/lib/python/omero/cli.py", line 791, in invoke
    stop = self.onecmd(line, previous_args)
  File "/apps/omero/OMERO.server/lib/python/omero/cli.py", line 860, in onecmd
    self.execute(line, previous_args)
  File "/apps/omero/OMERO.server/lib/python/omero/cli.py", line 940, in execute
    args.func(args)
  File "/apps/omero/OMERO.server/lib/python/omero/plugins/admin.py", line 1299, in cleanse
    config_service=client.sf.getConfigService())
  File "/apps/omero/OMERO.server/lib/python/omero/util/cleanse.py", line 214, in cleanse
    cleanser.cleanse(full_path)
  File "/apps/omero/OMERO.server/lib/python/omero/util/cleanse.py", line 100, in cleanse
    for file in os.listdir(root):
OSError: [Errno 2] No such file or directory: '/data/OMERO.data/Pixels'



1) Does this need updating now that there's no Pixel directory (circa 5.X.X)?
2) Am I right in assuming that this script should delete orphaned data stored in the fs.repo.path as well as Files/Thumbnails &c.

Thanks!

Dave
davemason
 
Posts: 47
Joined: Thu Mar 06, 2014 3:00 pm
Location: Liverpool, UK

Re: Using Cleanse to remove deleted files

Postby sbesson » Mon Jun 16, 2014 8:03 am

Hi Dave,

1) you are absolutely right, thanks for the report. The `admin cleanse` command definitely needs to account for non-existing `Pixels` directories. We opened a Pull Request to fix this command in the upcoming 5.0.3 release of OMERO.

2) from 5.0.0 and onwards, deleting single images or multiple images files should now directly remove the files stored under the `ManagedRepository`. Problems have been seen while deleting files on Windows servers. However, subsequent calls to `bin\omero admin cleanse` should fix this.

Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Using Cleanse to remove deleted files

Postby davemason » Mon Jun 16, 2014 8:46 am

Sebastien;

Thanks for the Clarification. On my build of 5.0.2, the original files have remained in the Managed Repository. If 5.0.3+ will fix this, I'm happy to wait for the patch.

Cheers,

Dave
davemason
 
Posts: 47
Joined: Thu Mar 06, 2014 3:00 pm
Location: Liverpool, UK


Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest