After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 705893 - ostree commit: error: No data available
ostree commit: error: No data available
Status: RESOLVED FIXED
Product: ostree
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: OSTree maintainer(s)
OSTree maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-08-13 11:27 UTC by Stef Walter
Modified: 2013-08-14 05:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Properly separate sorted xattr names (1.02 KB, patch)
2013-08-13 13:43 UTC, Stef Walter
committed Details | Review
Don't use XATTR_REPLACE with lsetxattr() (1.13 KB, patch)
2013-08-13 13:43 UTC, Stef Walter
committed Details | Review
Add some verbose log output when xattr functions fail (2.20 KB, patch)
2013-08-13 13:43 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2013-08-13 11:27:10 UTC
When trying to commit a Fedora base tree, I get this:

# ostree --repo=repo commit --subject 'Fedora 19 base' -b fedora/x86_64 --tree=dir=/data/build/ostree/fedora
error: No data available

This is my first commit to a repo created with:

# ostree --repo=repo init

The directory tree I'm adding was created with:

yum -y --releasever=19 --nogpg --installroot=/srv/mycontainer --dis
ablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release vim-m
inimal
Comment 1 Stef Walter 2013-08-13 11:33:09 UTC
Failure happens during:

lxgetattr("/data/build/ostree/fedora/var/log/journal" ...)

in read_xattr_name_array()

This is a directory: /data/build/ostree/fedora/var/log/journal

# ls -l /data/build/ostree/fedora/var/log/
total 24
drwxr-xr-x+ 2 root root  4096 14. Jun 16:24 journal

read_xattr_name_array() is trying to read an attirbute called:

security.selinuxsystem.posix_acl_accesssystem.posix_acl_default
Comment 2 Stef Walter 2013-08-13 13:43:02 UTC
Created attachment 251495 [details] [review]
Properly separate sorted xattr names

We expect to be handling a string delimited by \0 characters, as
returned by llistxattr(). So stick to that behavior here.
Comment 3 Stef Walter 2013-08-13 13:43:07 UTC
Created attachment 251496 [details] [review]
Don't use XATTR_REPLACE with lsetxattr()

If we pass XATTR_REPLACE then the attribute must already exist, which
is not our intent. Passing zero creates the attribute if necessary,
or replaces it when it already exists.
Comment 4 Stef Walter 2013-08-13 13:43:12 UTC
Created attachment 251497 [details] [review]
Add some verbose log output when xattr functions fail

If any of the system xattr functions fail, clearly write out the
reason in the verbose log output.
Comment 5 Colin Walters 2013-08-13 22:55:16 UTC
Review of attachment 251495 [details] [review]:

Ah yes, you can tell the xattr code is not well tested =(
Comment 6 Colin Walters 2013-08-13 22:56:01 UTC
Review of attachment 251496 [details] [review]:

Looks right, thanks!
Comment 7 Colin Walters 2013-08-13 22:57:40 UTC
Review of attachment 251497 [details] [review]:

::: src/libostree/ostree-core.c
@@ +190,1 @@
           ot_util_set_error_from_errno (error, errno);

I'd prefer doing this as g_prefix_error() instead; you can see those inconsistently scattered about the code.  Although the argument list is probably overkill; just something like:

g_prefix_error (error, "lgetxattr(%s) failed: ", path);
Comment 8 Colin Walters 2013-08-13 22:58:57 UTC
(In reply to comment #0)
> When trying to commit a Fedora base tree, I get this:

BTW, see also:

http://fedorapeople.org/cgit/walters/public_git/fedora-ostree.git
Briefly mentioned here:
https://mail.gnome.org/archives/ostree-list/2013-June/msg00001.html
Comment 9 Stef Walter 2013-08-14 05:56:22 UTC
Attachment 251495 [details] pushed as c246c41 - Properly separate sorted xattr names
Attachment 251496 [details] pushed as 3f9c150 - Don't use XATTR_REPLACE with lsetxattr()
Attachment 251497 [details] pushed as 9794737 - Add some verbose log output when xattr functions fail

Made the suggested changes to the logging of xattr functions.