CentOS / container-pipeline-service

Code, infrastructure and deployment backend for the CentOS Container Pipeline backing up build system for registry.centos.org
https://registry.centos.org
GNU General Public License v3.0
49 stars 27 forks source link

Scanner worker looks at incorrect location for results of pipeline-scanner (yum-update scanner) #569

Closed dharmit closed 6 years ago

dharmit commented 6 years ago

Scanner worker is expecting a file named image_scan_results.json whereas we recently moved to having unified file names as a result of which pipeline-scanner outputs the data to pipeline-scanner-results.json file.

$ journalctl -u cccp-scan-worker |grep 4f70013b6b67a4c3b550eb64f9ca2ceb88afc417244253592266ca3ad647d23c | grep pipeline-scanner
Apr 12 09:17:43 scanner.lon1.centos.org scan.py[26138]: [2018-04-12 09:17:43,240] scan-worker p26138 152 INFO - Executing atomic scan:  atomic scan --scanner=pipeline-scanner --rootfs=/4f70013b6b67a4c3b550eb64f9ca2ceb88afc417244253592266ca3ad647d23c 4f70013b6b67a4c3b550eb64f9ca2ceb88afc417244253592266ca3ad647d23c
Apr 12 09:17:44 scanner.lon1.centos.org scan.py[26138]: [2018-04-12 09:17:44,464] scan-worker p26138 169 INFO - Result file: /var/lib/atomic/pipeline-scanner/2018-04-12-09-17-43-678076/_4f70013b6b67a4c3b550eb64f9ca2ceb88afc417244253592266ca3ad647d23c/image_scan_results.json
Apr 12 09:17:44 scanner.lon1.centos.org scan.py[26138]: [2018-04-12 09:17:44,465] scan-worker p26138 175 CRITICAL - No scan results found at /var/lib/atomic/pipeline-scanner/2018-04-12-09-17-43-678076/_4f70013b6b67a4c3b550eb64f9ca2ceb88afc417244253592266ca3ad647d23c/image_scan_results.json
$ ls /var/lib/atomic/pipeline-scanner/2018-04-12-09-17-43-678076/_4f70013b6b67a4c3b550eb64f9ca2ceb88afc417244253592266ca3ad647d23c/
pipeline_scanner_results.json
dharmit commented 6 years ago

To fix this, we need to modify this line https://github.com/CentOS/container-pipeline-service/blob/9478caa538c099ee4a9b90697cdaadb7ce8b0619/container_pipeline/lib/default_settings.py#L169-L172