[Swift-devel] Wrapper staging

Mihael Hategan hategan at mcs.anl.gov
Wed May 8 12:46:45 CDT 2013


I'm a bit busy today and this week, so I might not get to fixing these
until the weekend, but I'll try to answer some of your questions.

On Wed, 2013-05-08 at 10:53 -0500, David Kelly wrote:
> Hello, 
> 
> 
> Just a few random questions about wrapper staging: 
> 
> 
> How can I make gsiftp:// URIs get sent to _swiftwrap.wrapperstaging? I
> have wrapper staging enabled, but Swift is trying to connect to the
> server and retrieve the file, rather than just passing the URI to the
> wrapper script. 

With wrapper staging enabled, swift should not try to *transfer* files,
but mappers might connect to the server to figure out what files are
there (i.e. to complete calls to Mapper.existing()).

> 
> What does the property wrapper.staging.local.server do? 

It specifies what url prefix to pass to the wrapper for local files
(i.e. accessible directly by swift). 

> 
> 
> From within _swiftwrap.wrapperstaging, how can I know the current
> working directory of the user? I think I need this information to
> handle relative path names. 

The wrapper should get a -urlprefix argument containing the CWD. The
value of that arg is constructed as: ${wrapper.staging.local.server} +
${CWD}.

> 
> 
> I believe in trunk, filenames passed as arguments to Swift apps being
> prepended with "__root__". What does this mean, and should swiftwrap
> strip this out? 

No. There is a mapping from local file names to remote file names. It
used to be that absolute files are mapped simply by removing the leading
slash. So "/dir/file" on the swift side would become "dir/file" on the
remote side. But then if there was a local "dir/file", it would also be
"dir/file" on the remote side, causing a conflict.

At some point in trunk, I changed that (and also the handling of "/../")
in response to a bug that, I believe, Ketan submitted. The change
involved mapping a leading slash to "__root__" and parent dir references
to "__parent__". They have no special meaning as far as the wrapper or
the application is concerned. They get the proper path through @filename
and the likes, and swift stages the files in the places pointed by
@filename.

Mihael




More information about the Swift-devel mailing list