Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1413887 - unused '<none>' images can't be removed
Summary: unused '<none>' images can't be removed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-17 09:07 UTC by Alex Jia
Modified: 2020-05-05 14:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 14:32:42 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Alex Jia 2017-01-17 09:07:49 UTC
Description of problem:
Unused 'dangling' images can't be removed.

Version-Release number of selected component (if applicable):

[root@atomic-host-test-986 ~]# atomic host status
State: idle
Deployments:
● rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
       Version: 7.3.2 (2017-01-13 22:00:41)
        Commit: 96826a0d917d7ff10f9fd0289581649f2ffbddd76f3b80efd3d95cc11915cacb
        OSName: rhel-atomic-host

[root@atomic-host-test-986 ~]# rpm -q atomic docker skopeo
atomic-1.14.1-5.el7.x86_64
docker-1.12.5-14.el7.x86_64
skopeo-0.1.17-1.el7.x86_64

[root@atomic-host-test-986 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Atomic Host release 7.3

How reproducible:
always

Steps to Reproduce:
1. make sure dangling images exist in your host
2. atomic images prune
3. atomic images delete <dangling_image>

Actual results:

# atomic images list -a
   REPOSITORY          TAG      IMAGE ID       CREATED            VIRTUAL SIZE   TYPE      
   docker.io/busybox   latest   7968321274dc   2017-01-13 22:13   1.11 MB        docker       
   <none>              <none>   e1dc8e08c83b   2017-01-13 05:36   371.87 MB      docker    
   <none>              <none>   aa12bb74b8f6   2017-01-13 05:34   197.1 MB       docker 

# atomic images prune
# atomic images list -a
   REPOSITORY          TAG      IMAGE ID       CREATED            VIRTUAL SIZE   TYPE      
   docker.io/busybox   latest   7968321274dc   2017-01-13 22:13   1.11 MB        docker       
   <none>              <none>   e1dc8e08c83b   2017-01-13 05:36   371.87 MB      docker    
   <none>              <none>   aa12bb74b8f6   2017-01-13 05:34   197.1 MB       docker 

# atomic images delete e1dc8e08c83b
list index out of range


Expected results:
fix it.

Additional info:

Comment 2 Brent Baude 2017-01-18 15:01:01 UTC
The exception should be fixed with https://github.com/projectatomic/atomic/pull/837


Just to be clear, a <none> <none> does not necessarily mean the image is dangling.  By our current definition, dangling images are preceeded with a * in atomic images list -a

Comment 3 Brent Baude 2017-02-27 16:10:24 UTC
Would you agree this is fixed?

Comment 4 Alex Jia 2017-02-28 14:37:09 UTC
(In reply to Brent Baude from comment #3)
> Would you agree this is fixed?

Yes, to document this should be enough.

Comment 5 Micah Abbott 2018-03-12 14:26:43 UTC
Alex, could you please close this if you think this is fixed?  Or comment if you think there is additional work that is necessary?

Comment 6 Alex Jia 2018-03-13 02:36:40 UTC
At present, a dangling container image can be removed by atomic images delete.

$ rpm -q atomic skopeo
atomic-1.21.1-1.git1170769.el7.x86_64
skopeo-0.1.28-1.git0270e56.el7.x86_64

$ sudo atomic images list -a | grep 57310166fe88
   <none>                                                                                <none>   57310166fe88   2018-02-01 17:18                  ostree    

$ sudo  atomic -y images delete 57310166fe88
The following images will be deleted.

   IMAGE          STORAGE
   57310166fe88   ostree

$ sudo  atomic images list -a | grep 57310166fe88
$


Note You need to log in before you can comment on or make changes to this bug.