mirror.py is failing with FileNotFoundError
Manually running the following steps:
- python3 scan.py
- python3 reduce.py
- python3 mirror.py
The first two steps execute successfully. The 3rd step results in:
root@802819b746a5:/python/src/iron-bank/replicator/replicator# python3 mirror.py
processing 1/1 (310/310 images)
- processing twistlock/defender/defender:20.04.163
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
dowloaded report
ERROR: /python/src/iron-bank/replicator/replicator/temp/twistlock/defender/defender/defender-20.04.163-reports-signature.tar.gz is not a tarfile
- processing twistlock/defender/defender:19.11.512
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
dowloaded report
ERROR: /python/src/iron-bank/replicator/replicator/temp/twistlock/defender/defender/defender-19.11.512-reports-signature.tar.gz is not a tarfile
- processing twistlock/console/console:20.04.163
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
dowloaded report
ERROR: /python/src/iron-bank/replicator/replicator/temp/twistlock/console/console/console-20.04.163-reports-signature.tar.gz is not a tarfile
- processing twistlock/console/console:19.11.506
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
dowloaded report
ERROR: /python/src/iron-bank/replicator/replicator/temp/twistlock/console/console/console-19.11.506-reports-signature.tar.gz is not a tarfile
- processing stackrox/stackrox/scanner-rhel:2.2.1
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
dowloaded report
image tar was not present
/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
**Traceback (most recent call last):
File "mirror.py", line 12, in <module>
mirror()
File "/python/src/iron-bank/replicator/replicator/app/mirror.py", line 95, in mirror
dcar_image_name, dcar_image_details, push_w_docker):
File "/python/src/iron-bank/replicator/replicator/dcar/image.py", line 191, in mirror_image
with open(image_tar, 'wb') as tar_download:
FileNotFoundError: [Errno 2] No such file or directory: '/python/src/iron-bank/replicator/replicator/temp/stackrox/stackrox/scanner-rhel/2020-05-17T09:42:10.327_4/scanner-rhel-2.2.1.tar'**
The content of the stackrox folder is:
root@802819b746a5:/python/src/iron-bank/replicator/replicator# cd temp/stackrox/stackrox/scanner-rhel
root@802819b746a5:/python/src/iron-bank/replicator/replicator/temp/stackrox/stackrox/scanner-rhel# ls -al
total 161932
drwxr-xr-x 3 root root 4096 May 27 17:56 .
drwxr-xr-x 3 root root 4096 May 27 17:56 ..
drwxr-xr-x 6 root root 4096 May 17 10:08 reports
-rw-r--r-- 1 root root 165805119 May 27 18:24 scanner-rhel-2.2.1-reports-signature.tar.gz