radical-cybertools / radical.saga

A Light-Weight Access Layer for Distributed Computing Infrastructure and Reference Implementation of the SAGA Python Language Bindings.
http://radical-cybertools.github.io/saga-python/
Other
83 stars 34 forks source link

saga.filesystem.Directory(dirname, saga.filesystem.CREATE, ...) doesn't create dir #452

Closed Francis-Liu closed 8 years ago

Francis-Liu commented 8 years ago

dirname="sftp://hostname/tmp/xxx"

"/tmp" pre-exists on hostname, which means I'm only going to mkdir at the lowest "xxx" level.

However, saga.filesystem.CREATE_PARENTS seems to work correctly.

----> 5 b.resources['stampede_tacc_xsede_org'].get_bandwidth_now(ORIGIN, 'out')

/home/grad03/fengl/AIMES_project/aimes.bundle/src/aimes/bundle/bundle.py in get_bandwidth_now(self, tgt, mode) 254 session.add_context(ctx) 255 --> 256 workdir = saga.filesystem.Directory(dirname, saga.filesystem.CREATE, session=session) 257 mbwrapper = saga.filesystem.File('file://localhost/%s/impl/iperf-client.sh' % os.getcwd()) 258 mbwrapper.copy(workdir.get_url())

/home/grad03/fengl/mypyenv2.sc2014.demo/local/lib/python2.7/site-packages/saga/filesystem/directory.pyc in init(self, url, flags, session, _adaptor, _adaptor_state, _ttype) 93 self._nsdirec = super (Directory, self) 94 self._nsdirec.init (url, flags, session, ---> 95 _adaptor, _adaptor_state, _ttype=_ttype) 96 97

/home/grad03/fengl/mypyenv2.sc2014.demo/local/lib/python2.7/site-packages/saga/namespace/directory.pyc in init(self, url, flags, session, _adaptor, _adaptor_state, _ttype) 93 self._nsentry = super (Directory, self) 94 self._nsentry.init (url, flags, session, ---> 95 _adaptor, _adaptor_state, _ttype=_ttype) 96 97

/home/grad03/fengl/mypyenv2.sc2014.demo/local/lib/python2.7/site-packages/saga/namespace/entry.pyc in init(self, url, flags, session, _adaptor, _adaptor_state, _ttype) 87 self._base = super (Entry, self) 88 self._base.init (scheme, _adaptor, _adaptor_state, ---> 89 url, flags, session, ttype=_ttype) 90 91

/home/grad03/fengl/mypyenv2.sc2014.demo/local/lib/python2.7/site-packages/saga/base.pyc in init(self, schema, adaptor, adaptor_state, _args, _kwargs) 99 # workload to the adaptor level init_instance method. 100 --> 101 self._init_task = self._adaptor.init_instance (adaptor_state, _args, _kwargs) 102 103 if 'ttype' in kwargs and kwargs['ttype'] :

/home/grad03/fengl/mypyenv2.sc2014.demo/local/lib/python2.7/site-packages/saga/adaptors/cpi/decorators.pyc in wrap_function(self, _args, _kwargs) 55 del(kwargs['_from_task']) 56 ---> 57 return sync_function (self, _args, _kwargs) 58 59 return wrap_function

/home/grad03/fengl/mypyenv2.sc2014.demo/local/lib/python2.7/site-packages/saga/adaptors/shell/shell_file.pyc in init_instance(self, adaptor_state, url, flags, session) 276 # right location (see self._command()) 277 --> 278 self.initialize () 279 280 # we create a local shell handle, too, if only to support copy and move

/home/grad03/fengl/mypyenv2.sc2014.demo/local/lib/python2.7/site-packages/saga/adaptors/shell/shell_file.pyc in initialize(self) 335 336 if ret != 0 : --> 337 raise saga.BadParameter ("invalid dir '%s': %s" % (self.url.path, out)) 338 339 self._logger.debug ("initialized directory (%s)(%s)" % (ret, out))

BadParameter: invalid dir '/tmp/iperf/': /bin/sh: 2: cd: can't cd to /tmp/iperf/ /bin/sh: 2: cd: can't cd to /tmp/iperf/ (/home/grad03/fengl/mypyenv2.sc2014.demo/local/lib/python2.7/site-packages/saga/adaptors/shell/shell_file.py +337 (initialize) : raise saga.BadParameter ("invalid dir '%s': %s" % (self.url.path, out)))

andre-merzky commented 8 years ago

Thanks for the ticket, Francis! This should be fixed in https://github.com/radical-cybertools/saga-python/pull/455 and will soon make it into the release.