images created are not unlinkable and cause uvtool to fail next sync

Bug #1623803 reported by Christian Ehrhardt 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
uvtool (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi,
this has puzzled me for a while and I think I now at least have enough data to report it for discussion.

It seems that when I sync images they get created without the right permissions/ownership?
Effectively I see after a sync of images that they look fine in a query:

uvt-simplestreams-libvirt query
release=xenial arch=amd64 label=daily (20160914)
release=yakkety arch=amd64 label=daily (20160914)

Those are the images of yesterday (this will become important)

And in the FS those look like
ll /var/lib/uvtool/libvirt/images/x-uvt-b64-Y29tLnVidW50dS5jbG91ZC5kYWlseTpzZXJ2ZXI6MTYuMDQ6YW1kNjQgMjAxNjA5MDk=
-rw------- 1 libvirt-qemu kvm 1020067840 Sep 14 09:22 /var/lib/uvtool/libvirt/images/x-uvt-b64-Y29tLnVidW50dS5jbG91ZC5kYWlseTpzZXJ2ZXI6MTYuMDQ6YW1kNjQgMjAxNjA5MDk=

All fine and working.
But on a subsequent sync that wants to unlink those uvt is failing, the same happens for a purge.
uvt-simplestreams-libvirt purge
Traceback (most recent call last):
  File "/usr/bin/uvt-simplestreams-libvirt", line 27, in <module>
    uvtool.libvirt.simplestreams.main()
  File "/usr/lib/python2.7/dist-packages/uvtool/libvirt/simplestreams.py", line 326, in main
    args.func(args)
  File "/usr/lib/python2.7/dist-packages/uvtool/libvirt/simplestreams.py", line 286, in main_purge
    purge_pool()
  File "/usr/lib/python2.7/dist-packages/uvtool/libvirt/simplestreams.py", line 142, in purge_pool
    volume.delete(0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3359, in delete
    if ret == -1: raise libvirtError ('virStorageVolDelete() failed', vol=self)
libvirt.libvirtError: cannot unlink file '/var/lib/uvtool/libvirt/images/x-uvt-b64-Y29tLnVidW50dS5jbG91ZC5kYWlseTpzZXJ2ZXI6MTYuMDQ6YW1kNjQgMjAxNjA5MDk=': Permission denied

I wonder if something in my setup is odd - e.g. that the permissions shouldn't be this way to begin. And I wanted to discuss that before we debug deeper into what is happening in the code while executing.

Revision history for this message
Robie Basak (racb) wrote :

Thanks Christian. I've seen this too, as has Ryan I think, but we never found a clean reproducer on a fresh system. Is this the same as bug 1608704?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: [Bug 1623803] Re: images created are not unlinkable and cause uvtool to fail next sync

> Is this the same as bug 1608704?
>

The permissions described in 1608704 are true on my system as well.
Yet I can destroy guests just nice.
So I think not the same but maybe two symptoms of the same root cause.

Revision history for this message
Robie Basak (racb) wrote :

Also there's bug 1571068. Is this a dupe of that one?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Yes that is the one I mentioned on IRC.
And I helped this today to pass proposed, at least for me the issue is fixed by that.
So I'd dup this bug to 1571068

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.