Bug 90338 - Can't delete container image
Summary: Can't delete container image
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-06 12:39 UTC by reji
Modified: 2015-05-06 16:24 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description reji 2015-05-06 12:39:54 UTC
After pulling image, machinectl can't delete that image:

core3 ~ # ls -la /var/lib/machines/
total 4
drwx------  1 root root  326 May  6 12:13 .
drwxr-xr-x 21 root root 4096 May  5 22:02 ..
drwxr-xr-x  1 root root  152 May  6 12:07 .tar-https:\x2f\x2fcloud-images\x2eubuntu\x2ecom\x2ftrusty\x2fcurrent\x2ftrusty-server-cloudimg-amd64-root\x2etar\x2egz.\x221480903-b230d19-514f7409c0e40\x22
drwxr-xr-x  1 root root  152 May  6 12:07 ubuntu
core3 ~ # machinectl remove ubuntu
Could not remove image: Access denied
core3 ~ # btrfs sub li /var/lib/machines/
ID 257 gen 60 top level 5 path machines
ID 258 gen 17 top level 5 path mysql
ID 266 gen 57 top level 257 path .tar-https:\x2f\x2fcloud-images\x2eubuntu\x2ecom\x2ftrusty\x2fcurrent\x2ftrusty-server-cloudimg-amd64-root\x2etar\x2egz.\x221480903-b230d19-514f7409c0e40\x22
ID 267 gen 59 top level 257 path ubuntu
core3 ~ # mount | egrep 'sda9|sda10'
/dev/sda9 on / type ext4 (rw,relatime,data=ordered)
/dev/sda10 on /var/lib/machines type btrfs (rw,relatime,space_cache)
/dev/sda10 on /var/lib/mysql type btrfs (rw,relatime,space_cache)

but btrfs can:
core3 ~ # btrfs sub del /var/lib/machines/ubuntu/
Transaction commit: none (default)
Delete subvolume '/var/lib/machines/ubuntu'
core3 ~ # ls -la /var/lib/machines/
total 4
drwx------  1 root root  314 May  6 12:39 .
drwxr-xr-x 21 root root 4096 May  5 22:02 ..
drwxr-xr-x  1 root root  152 May  6 12:07 .tar-https:\x2f\x2fcloud-images\x2eubuntu\x2ecom\x2ftrusty\x2fcurrent\x2ftrusty-server-cloudimg-amd64-root\x2etar\x2egz.\x221480903-b230d19-514f7409c0e40\x22
Comment 1 Lennart Poettering 2015-05-06 16:24:03 UTC
This has been fixed a while back in git.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.