Skip to content

Stack trace when ostree operates in filesystem not supporting extended attributes

When initializing an artifact cache on a volume that does not support extended attributes, like a tmpfs, instead of a human readable error message, BuildStream aborts with a stack trace:

Traceback (most recent call last):
  File "/codethink/GNOME/buildstream/tests/testutils/runcli.py", line 287, in invoke
    cli.main(args=args or (), prog_name=cli.name, **extra)
  File "/codethink/GNOME/buildstream/buildstream/_frontend/cli.py", line 104, in override_main
    standalone_mode=standalone_mode, **extra)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/codethink/GNOME/buildstream/buildstream/_frontend/cli.py", line 203, in build
    fetch_subprojects=True)
  File "/codethink/GNOME/buildstream/buildstream/_frontend/main.py", line 188, in initialize
    rewritable=rewritable)
  File "/codethink/GNOME/buildstream/buildstream/_pipeline.py", line 120, in __init__
    Platform._create_instance(context, project)
  File "/codethink/GNOME/buildstream/buildstream/_platform/platform.py", line 63, in _create_instance
    cls._instance = PlatformImpl(*args, **kwargs)
  File "/codethink/GNOME/buildstream/buildstream/_platform/linux.py", line 39, in __init__
    self._artifact_cache = OSTreeCache(context, self._user_ns_available)
  File "/codethink/GNOME/buildstream/buildstream/_artifactcache/ostreecache.py", line 74, in __init__
    self.repo = _ostree.ensure(ostreedir, False)
  File "/codethink/GNOME/buildstream/buildstream/_ostree.py", line 54, in ensure
    repo.create(mode)
GLib.GError: g-io-error-quark: fsetxattr(user.ostreemeta): Operation not supported (15)

This should be caught and an ArtifactError with a reasonable error message should be raised instead.

This was discovered at the same time as #267 (closed)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information