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 1542144

Summary: installing system container returning "in method 'selabel_lookup_raw', argument 3 of type 'char const *'"
Product: Red Hat Enterprise Linux 7 Reporter: Micah Abbott <miabbott>
Component: atomicAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: ajia, bbaude, bbreard, ddarrah, dwalsh, fkluknav, gscrivan, smilner
Target Milestone: rcKeywords: Extras
Target Release: 7.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: When using selinux.selabel_lookup_raw the dest variable was not always a string as it once was. Consequence: selinux.selabel_lookup_raw would throw a stack trace stopping functionality. Fix: Force dest to always be a string. Result: selinux.selabel_lookup_raw now longer throws a stack trace and works as expected.
Story Points: ---
Clone Of:
: 1548169 (view as bug list) Environment:
Last Closed: 2018-03-07 09:53:12 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:
Bug Depends On:    
Bug Blocks: 1548169    

Description Micah Abbott 2018-02-05 16:44:30 UTC
Using early RHELAH 7.4.5 compose, I'm seeing the following when trying to install 'etcd' as a system container:

# atomic --debug install --system --system-package=no --name etcd registry.fedoraproject.org/f27/etcd                                                                                 
Namespace(_class=<class 'Atomic.install.Install'>, args=[], assumeyes=False, debug=True, display=False, func='install', ignore=False, image='registry.fedoraproject.org/f27/etcd', name='etcd', opt1=None, opt2=None, opt3=None, profile=False, remote=None, runtime=None, setvalues=None, storage=None, system=True, system_package='no', user=False)
Extracting to /var/lib/containers/atomic/etcd.0     
File /etc/etcd/etcd.conf already exists             
in method 'selabel_lookup_raw', argument 3 of type 'char const *'                                        
Traceback (most recent call last):                  
  File "/bin/atomic", line 185, in <module>         
    sys.exit(_func())                               
  File "/usr/lib/python2.7/site-packages/Atomic/install.py", line 134, in install                        
    return be.install(self.image, self.name)        
  File "/usr/lib/python2.7/site-packages/Atomic/backends/_ostree.py", line 128, in install               
    return self.syscontainers.install(image, name)  
  File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 563, in install                  
    return_value = self._install(image, name)       
  File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 686, in _install                 
    self._checkout_wrapper(repo, name, image, 0, SystemContainers.CHECKOUT_MODE_INSTALL, values=values, remote=self.args.remote, system_package=self.args.system_package)                                          
  File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 797, in _checkout_wrapper        
    return self._checkout(repo, options)            
  File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 813, in _checkout                
    return self._do_checkout(repo, options)         
  File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 1126, in _do_checkout            
    rpm_install_content = self._handle_system_package_files(options, manifest, exports)                  
  File "/usr/lib/python2.7/site-packages/Atomic/syscontainers.py", line 469, in _handle_system_package_files                                                                                                       
    new_installed_files_checksum = RPMHostInstall.rm_add_files_to_host(options["installed_files_checksum"], exports, options["prefix"] or "/", files_template=installed_files_template, values=options["values"], rename_files=rename_files, use_links=use_links)
  File "/usr/lib/python2.7/site-packages/Atomic/rpm_host_install.py", line 155, in rm_add_files_to_host  
    created = RPMHostInstall._copyfile(selinux_hnd, src_file, dest_path, try_hardlink=try_hardlink)      
  File "/usr/lib/python2.7/site-packages/Atomic/rpm_host_install.py", line 24, in _copyfile              
    ctx = selinux.selabel_lookup_raw(selinux_hnd, dest, mode)                                            
TypeError: in method 'selabel_lookup_raw', argument 3 of type 'char const *'                             



RHELAH includes the 'etcd' RPM default, so I understand why we are getting the error about /etc/etcd/etcd.conf already existing.  But the TypeError seems like a problem.


# rpm-ostree status
State: idle
Deployments:
● rhel745:rhel-atomic-host/7/x86_64/standard
                   Version: 7.4.5 (2018-02-05 00:07:59)
                    Commit: bb8c244eadbb48f5dfceaaf44630a82c986dfcc9ee431143a53935b2f3a2dcd0
              GPGSignature: Valid signature by 567E347AD0044ADE55BA8A5F199E2F91FD431D51

# rpm -q atomic
atomic-1.21.1-1.git1170769.el7.x86_64

Comment 2 Giuseppe Scrivano 2018-02-05 17:04:29 UTC
PR here:

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

Comment 5 Alex Jia 2018-02-23 03:12:03 UTC
This issue has been fixed in atomic-1.22.1-1.gitd36c015.el7.x86_64.


[root@atomic-host-test-4109 cloud-user]# rpm -q atomic
atomic-1.22.1-1.gitd36c015.el7.x86_64

[root@atomic-host-test-4109 cloud-user]# atomic --debug install --system --system-package=no --name etcd registry.fedoraproject.org/f27/etcd
Namespace(_class=<class 'Atomic.install.Install'>, args=[], assumeyes=False, debug=True, display=False, func='install', ignore=False, image='registry.fedoraproject.org/f27/etcd', name='etcd', opt1=None, opt2=None, opt3=None, profile=False, remote=None, runtime=None, setvalues=None, storage=None, system=True, system_package='no', user=False)
Extracting to /var/lib/containers/atomic/etcd.0
File /etc/etcd/etcd.conf already exists
Created file /usr/local/bin/etcdctl
systemctl daemon-reload
systemd-tmpfiles --create /etc/tmpfiles.d/etcd.conf
systemctl enable etcd

Comment 7 Lokesh Mandvekar 2018-02-23 18:56:38 UTC
*** Bug 1548169 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2018-03-07 09:53:12 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:0438