Bug 1292764

Summary: max() arg is an empty sequence
Product: Red Hat Enterprise Linux 7 Reporter: Alex Jia <ajia>
Component: atomicAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.4CC: dwalsh, walters
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-31 23:25:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alex Jia 2015-12-18 10:00:17 UTC
Description of problem:
When list of images are empty, atomic images will hit a python error 'max() arg is an empty sequence', which is not friendly for users.

Version-Release number of selected component (if applicable):
# rpm -q atomic docker
atomic-1.7-3.git95b28a9.el7.x86_64
docker-1.9.1-9.el7.x86_64

How reproducible:
always.

Steps to Reproduce:
1. make sure no avaiable images in docker
2. atomic images

Actual results:
# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE

# atomic images
max() arg is an empty sequence

Expected results:
# atomic images
There are no images available.

Additional info:

https://github.com/projectatomic/atomic/pull/260

Comment 2 Daniel Walsh 2016-02-01 04:40:32 UTC
Fixed in atomic-1.8

Comment 4 Alex Jia 2016-03-10 10:08:35 UTC
This issue has been fixed by the atomic-1.8-3.git958d939.el7 and works well on latest atomic-1.9-4.gitff44c6a.el7.x86_64, so moving the bug to VERIFIED status.

# rpm -q atomic docker python-docker-py
atomic-1.8-3.git958d939.el7.x86_64
docker-1.9.0-9.el7.x86_64
python-docker-py-1.6.0-1.el7.x86_64

[root@hp-dl360g9-03 ~]# atomic images
[root@hp-dl360g9-03 ~]# echo $?
0


[root@hp-dl360g9-03 ~]# rpm -q atomic docker python-docker-py
atomic-1.9-4.gitff44c6a.el7.x86_64
docker-1.9.1-19.el7.x86_64
python-docker-py-1.7.2-1.el7.noarch


[root@hp-dl360g9-03 ~]# atomic images
[root@hp-dl360g9-03 ~]# echo $?
0

Comment 6 errata-xmlrpc 2016-03-31 23:25:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0527.html