Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1498575

Summary: atomic blows up with error when layer is missing - TypeError: Argument 1 does not allow None as a value
Product: Red Hat Enterprise Linux 7 Reporter: Micah Abbott <miabbott>
Component: atomicAssignee: Giuseppe Scrivano <gscrivan>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: bbaude, ddarrah, dwalsh, fkluknav, weshen
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-26 07:47:53 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 Micah Abbott 2017-10-04 16:21:21 UTC
After running through the 'system-containers' tests[0] against RHELAH 7.4.1, I saw the following error when trying to delete all the images on the system:

TASK [atomic_images_delete_all : Remove all images] ****************************                         
fatal: [rhelah]: FAILED! => {                                                                            
    "changed": true,                                                                                     
    "cmd": [                                                                                             
        "atomic",                                                                                        
        "--assumeyes",                                                                                   
        "images",                                                                 
        "delete",                                                                 
        "--all"                                                                   
    ], 
    "delta": "0:00:00.843052", 
    "end": "2017-10-04 15:17:29.204833", 
    "failed": true, 
    "rc": 1, 
    "start": "2017-10-04 15:17:28.361781", 
    "warnings": []
}

STDOUT:
---
The following images will be deleted.

   IMAGE                                             STORAGE
   gscrivano/hello-world:latest                      ostree
   b02932bbf6d2                                      ostree
   00ddb097f3f5                                      ostree
   9357a8f32ec4                                      ostree
   c5d2e9481169                                      ostree
   registry.access.redhat.com/rhel7/etcd:latest      ostree
   1a34f7bacdc9                                      ostree
   registry.access.redhat.com/rhel7/flannel:latest   ostree
   e373541ccf6a                                      ostree
   92fd2502b63e                                      ostree
   1f14dbed01c6                                      ostree
---

STDERR:
---
Argument 1 does not allow None as a value
---

When investigating the system directly, I saw more of the same errors when trying to use 'atomic images list':


# rpm -q atomic docker ostree                                               
atomic-1.18.1-4.git64843d3.el7.x86_64               
docker-1.12.6-55.gitc4618fb.el7.x86_64              
ostree-2017.7-1.el7.x86_64                          

# atomic images list --all                                                  
Argument 1 does not allow None as a value           

# atomic --debug images list --all                                                                                                                                                    
Namespace(_class=<class 'Atomic.images.Images'>, all=True, assumeyes=False, debug=True, filter=None, func='display_all_image_info', heading=True, ignore=False, json=False, profile=False, quiet=False, truncate=True)                                                 
Backends(docker: Active, ostree: Active, )          

Argument 1 does not allow None as a value           
Traceback (most recent call last):                  
  File "/bin/atomic", line 185, in <module>         
    sys.exit(_func())                               
  File "/usr/lib/python2.7/site-packages/Atomic/images.py", line 159, in display_all_image_info          
    _images = self._get_images()                    
  File "/usr/lib/python2.7/site-packages/Atomic/images.py", line 217, in _get_images                     
    _images = self.be_utils.get_images(get_all=self.args.all)                                            
  File "/usr/lib/python2.7/site-packages/Atomic/backendutils.py", line 149, in get_images                
    img_objs += be.get_images(get_all=get_all)      
  File "/usr/lib/python2.7/site-packages/Atomic/backends/_ostree.py", line 107, in get_images            
    return [self._make_image(x['Id'], x) for x in self.syscontainers.get_system_images(get_all=get_all)] 
  File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 1258, in get_system_images       
    return [self._inspect_system_branch(repo, x) for x in revs]                                          
  File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 1225, in _inspect_system_branch  
    virtual_size = self._get_virtual_size(repo, manifest)                                                
  File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 1244, in _get_virtual_size       
    size = self._get_commit_metadata(repo, rev, 'docker.size')                                           
  File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 1686, in _get_commit_metadata    
    commit = repo.load_commit(rev)[1]               
TypeError: Argument 1 does not allow None as a value


Giuseppe was able to investigate and determined that one of the layers was missing and it was causing 'atomic' to blow up in this way.

Right now, it is not certain how the system got into a place where one of the layers went missing.


[0] https://github.com/projectatomic/atomic-host-tests/tree/master/tests/system-containers

Comment 2 Giuseppe Scrivano 2017-10-05 08:37:46 UTC
PR here: https://github.com/projectatomic/atomic/pull/1107

Comment 4 Edward Shen 2018-09-10 11:40:47 UTC
verified on atomic-1.22.1-25.git5a342e3.el7.x86_64

Comment 6 errata-xmlrpc 2018-09-26 07:47:53 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://access.redhat.com/errata/RHBA-2018:2795