XENON1T / cax

Simple data management tool
ISC License
1 stars 2 forks source link

moved the file number counter inside the check of raw_size_byte #131

Closed lucrlom closed 7 years ago

lucrlom commented 7 years ago

I moved the position of nfiles because create the permission error.

lucrlom commented 7 years ago

yes, sorry

lucrlom commented 7 years ago

The permission problem on datamanager is still present. This means two possible solutions: 1) we found the reason why we have a different user in the raw data and we fix it 2) we delete that muon veto files from the datamanager disk

For the while I could skip the error with a try - exception, but it's no a clean solution.

lucrlom commented 7 years ago

Dear @XeBoris and @pdeperio, there is another condition that raise a error that I never considered, When the process have crashed and there are not zip file inside the directory. In this case of course I receive divided by zero error. So I need to put a check for this kind of error and set in this case raw_size_byte = 0

pdeperio commented 7 years ago

ok, you can add to this branch.

lucrlom commented 7 years ago

Ciao Patrick, I found the reason of the error. There is a run with zero event but not in error. So I should just check that build_event exist and is not zero.

lucrlom commented 7 years ago

ok I fixed it

lucrlom commented 7 years ago

@coderdj @XeBoris @pdeperio Guys another strange error maybe on the Run Database for the Run 1000:

AddSize     : DEBUG    Event per zip: 1000
root        : CRITICAL Exception caught from task AddSize
Traceback (most recent call last):
  File "/home/xe1tdatamanager/cax_fl_test/cax/main.py", line 147, in main
    task.go(args.run)
  File "/home/xe1tdatamanager/cax_fl_test/cax/task.py", line 65, in go
    self.each_run()
  File "/home/xe1tdatamanager/cax_fl_test/cax/tasks/filesystem.py", line 212, in each_run
    _location = data_doc['location']
KeyError: 'location'
root        : ERROR    'location'
Traceback (most recent call last):
  File "/home/xe1tdatamanager/cax_fl_test/cax/main.py", line 147, in main
    task.go(args.run)
  File "/home/xe1tdatamanager/cax_fl_test/cax/task.py", line 65, in go
    self.each_run()
  File "/home/xe1tdatamanager/cax_fl_test/cax/tasks/filesystem.py", line 212, in each_run
    _location = data_doc['location']
KeyError: 'location'
Traceback (most recent call last):
  File "/home/SHARED/anaconda3/envs/pax_head/bin/cax", line 9, in <module>
    load_entry_point('cax==5.2.1', 'console_scripts', 'cax')()
  File "/home/xe1tdatamanager/cax_fl_test/cax/main.py", line 147, in main
    task.go(args.run)
  File "/home/xe1tdatamanager/cax_fl_test/cax/task.py", line 65, in go
    self.each_run()
  File "/home/xe1tdatamanager/cax_fl_test/cax/tasks/filesystem.py", line 212, in each_run
    _location = data_doc['location']
KeyError: 'location'  

Here is the problem on the Database. @XeBoris can you delete this entry??

{

    "type": "raw",
    "checksum": null,
    "rse": [
        "NIKHEF_USERDISK"
    ],
    "creation_time": {
        "$date": 1474363293799
    },
    "host": "rucio",
    "status": "transferring",
    "file": "xe1t_SR00:160620_2028_raw_tpc.tar"

},
XeBoris commented 7 years ago

@lucrlom You can remove it, thank you.