radical-cybertools / radical.owms

Tiered Resource OverlaY
Other
0 stars 1 forks source link

plugin_workload_dispatcher_sinon.py fails when no data_stager is provided #13

Closed mturilli closed 10 years ago

mturilli commented 10 years ago

Here the error trace:

Traceback (most recent call last): File "bin/owms.py", line 670, in main(args) File "bin/owms.py", line 209, in main workload_manager, strategy=args.troy_strategy) File "/N/u/mturilli/AIMES/ve/lib/python2.7/site-packages/troy/strategy.py", line 34, in execute_workload strategy.execute (workload_id, planner, overlay_mgr, workload_mgr) File "/N/u/mturilli/AIMES/ve/lib/python2.7/site-packages/pilot/filemanagement/../../troy/plugins/strategy/plugin_strategy_basic_late_binding.py", line 110, in execute workload_mgr._stager.stage_in_workload (partition) File "/N/u/mturilli/AIMES/ve/lib/python2.7/site-packages/troy/workload/data_stager.py", line 44, in stage_in_workload self.stage_in_task (workload.tasks[task_id]) File "/N/u/mturilli/AIMES/ve/lib/python2.7/site-packages/troy/workload/data_stager.py", line 50, in stage_in_task self.stage_in_unit (task.units[unit_id]) File "/N/u/mturilli/AIMES/ve/lib/python2.7/site-packages/troy/workload/data_stager.py", line 67, in stage_in_unit unit.task.workload.manager._dispatcher.stage_file_in (fin, pilot.resource, unit.working_directory) File "/N/u/mturilli/AIMES/ve/lib/python2.7/site-packages/pilot/filemanagement/../../troy/plugins/workload_dispatcher/plugin_workload_dispatcher_sinon.py", line 225, in stage_file_in if src[0] != '/' : TypeError: 'NoneType' object is not subscriptable

andre-merzky commented 10 years ago

These are two issues:

No data stager (stager==None): Troy then falls back to the default data stager. As there is only one stager right now, that means that you end up with a stager :P I can change that default behavior, to not stage anything if no explicit stager is defined -- but that is somewhat out of sync with how we do things elsewhere. For example, we always fall back to default plugins if no explicit plugin is defined.

Failure: owms.py specifies:

        ....
        self.input_file = None
        ....
        task_description.inputs = [t.input_file, t.executable_name]

So 'None' is now explicitly listed as input file. I'll add a type check in the stager for a better error message, but ultimately it is an error troy cannot sensibly recover from.

andre-merzky commented 10 years ago

Both issues have been addressed.