Skip to content

xrootdpyfs: fix extended attributes fetch #127

Description

@alejandromumo

Problem

After an upload fails we try to delete the file(s) from the FS. This operation eventually checks whether the file is a directory (using the fs getinfo method). In turn, this executes fs._query(QueryCode.XATTR, path) which is not a valid query for XATTR (it seems it's an unsupported operation).


Possible fix

From what I see, the client supports extended attributes listing which I believe would be what we need. I ran some tests in the CLI and seems to be OK:

from xrootdpyfs.fs import XRootDPyFS

url = '...'
fs = XRootDPyFS(url)
path = '...'

# Current code that fails
fs._query(QueryCode.XATTR, path)

# Alternative code
extended_attr = fs._client.list_xattr(path)

In the example above, I realised that we have another issue when raising the fs exceptions (e.g. Unsupported). We must use raise Unsupported(msg=status.message). This is also being tracked by #122

If this is fixed, we could potentially have more visibility on why the upload failed on the first place (to be tested)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions