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