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 1346921

Summary: temp file in /etc/atomic.d/ causes an error when running 'atomic scan'
Product: Red Hat Enterprise Linux 7 Reporter: Micah Abbott <miabbott>
Component: atomicAssignee: Brent Baude <bbaude>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: ajia, dwalsh
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: 2016-11-04 09:06:16 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 2016-06-15 16:15:05 UTC
atomic-1.10.5-3.el7.x86_64

I was editing /etc/atomic.d/openscap and my session crashed, leaving a temp file in that directory (.openscap.swp)

When I tried to run 'atomic scan', I got the following:

# atomic scan registry.access.redhat.com/rhel7
'utf8' codec can't decode byte #xf2: invalid continuation byte
  in "/etc/atomic.d/.openscap.swp", position 20n

Comment 2 Daniel Walsh 2016-08-26 18:09:45 UTC
Could you run this with 

atomic --debug scan registry.access.redhat.com/rhel7

Comment 3 Brent Baude 2016-08-27 18:50:34 UTC
Upstream merge request -> https://github.com/projectatomic/atomic/pull/565  should remedy this.

Comment 4 Micah Abbott 2016-08-31 16:32:20 UTC
Brent's PR fixed the handling of bad data in /etc/atomic.d

So I think this will be fixed in atomic 1.12

Comment 5 Daniel Walsh 2016-09-01 11:44:08 UTC
Fixed in atomic-1.12

Comment 7 Alex Jia 2016-09-18 04:13:55 UTC
Only print an error message but do not fail in atomic-1.12.0-1.el7.x86_64, so moving to VERIFIED status.


# atomic scan --scanner openscap --scan_type cve registry.access.redhat.com/rhel7:latest
Error: Unable to load scannerfile /etc/atomic.d/.openscap.swp.  Continuing...
Error: Unable to load scannerfile /etc/atomic.d/.openscap.swp.  Continuing...
docker run -t --rm -v /etc/localtime:/etc/localtime -v /run/atomic/2016-09-18-12-11-40-493238:/scanin -v /var/lib/atomic/openscap/2016-09-18-12-11-40-493238:/scanout:rw,Z -v /etc/oscapd:/etc/oscapd:ro rhel7/openscap oscapd-evaluate scan --no-standard-compliance --targets chroots-in-dir:///scanin --output /scanout

<ignore .../>

Comment 9 errata-xmlrpc 2016-11-04 09:06:16 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-2628.html