minio / mint

Collection of tests to detect overall correctness of MinIO server.
Apache License 2.0
78 stars 50 forks source link

mint reports success even when log shows exception. #246

Closed poornas closed 6 years ago

poornas commented 6 years ago

mint run shows tests runs successfully even though log.json shows test failed. Steps to reproduce error 1.Modify Dockerfile.dev to copy public.crt to container after COPY ENTRYPOINT.sh statement

RUN dpkg-reconfigure ca-certificates
RUN sed 's/\!//g' -i /etc/ca-certificates.conf
RUN update-ca-certificates --fresh```
2. Run minio server with certs installed in .minio/certs in tls mode.
3. ```docker run -e SERVER_ENDPOINT=192.168.1.8:9000 -e ACCESS_KEY=minio -e SECRET_KEY=minio123 -e ENABLE_HTTPS=1 minio/mint111 minio-py```

{"status": "FAIL", "function": "make_bucket(bucket_name, location)", "name": "minio-py:test_make_bucket", "args": {"bucket_name": "minio-py-test-2a0b3d9d-b9e5-4213-b31c-6a7cbcd52cfb"}, "message": "HTTPSConnectionPool(host='192.168.1.8', port=9000): Max retries exceeded with url: /minio-py-test-2a0b3d9d-b9e5-4213-b31c-6a7cbcd52cfb/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)'),))", "duration": 6113, "error": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py\", line 601, in urlopen\n chunked=chunked)\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py\", line 346, in _make_request\n self._validate_conn(conn)\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py\", line 850, in _validate_conn\n conn.connect()\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/connection.py\", line 326, in connect\n sslcontext=context)\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/util/ssl.py\", line 329, in ssl_wrap_socket\n return context.wrap_socket(sock, server_hostname=server_hostname)\n File \"/usr/lib/python3.5/ssl.py\", line 377, in wrap_socket\n _context=self)\n File \"/usr/lib/python3.5/ssl.py\", line 752, in init\n self.do_handshake()\n File \"/usr/lib/python3.5/ssl.py\", line 988, in do_handshake\n self._sslobj.do_handshake()\n File \"/usr/lib/python3.5/ssl.py\", line 633, in do_handshake\n self._sslobj.do_handshake()\nssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/mint/run/core/minio-py/tests.py\", line 155, in test_make_bucket\n client.make_bucket(bucket_name)\n File \"/usr/local/lib/python3.5/dist-packages/minio/api.py\", line 272, in make_bucket\n headers=headers)\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/poolmanager.py\", line 321, in urlopen\n response = conn.urlopen(method, u.request_uri, kw)\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py\", line 668, in urlopen\n response_kw)\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py\", line 668, in urlopen\n response_kw)\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py\", line 668, in urlopen\n response_kw)\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py\", line 668, in urlopen\n response_kw)\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py\", line 668, in urlopen\n response_kw)\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py\", line 639, in urlopen\n _stacktrace=sys.exc_info()[2])\n File \"/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py\", line 388, in increment\n raise MaxRetryError(_pool, url, error or ResponseError(cause))\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.1.8', port=9000): Max retries exceeded with url: /minio-py-test-2a0b3d9d-b9e5-4213-b31c-6a7cbcd52cfb/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)'),))\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/mint/run/core/minio-py/tests.py\", line 765, in main\n test_make_bucket(client, log_output)\n File \"/mint/run/core/minio-py/tests.py\", line 161, in test_make_bucket\n raise Exception(err)\nException: HTTPSConnectionPool(host='192.168.1.8', port=9000): Max retries exceeded with url: /minio-py-test-2a0b3d9d-b9e5-4213-b31c-6a7cbcd52cfb/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)'),))\n"}

➜ mint git:(master) ✗ docker run -e SERVER_ENDPOINT=192.168.1.8:9000 -e ACCESS_KEY=minio -e SECRET_KEY=minio123 -e ENABLE_HTTPS=1 minio/mint111 minio-py Running with SERVER_ENDPOINT: 192.168.1.8:9000 ACCESS_KEY: minio SECRET_KEY: REDACTED ENABLE_HTTPS: 1 SERVER_REGION: us-east-1 MINT_DATA_DIR: /mint/data MINT_MODE: core

To get logs, run 'sudo docker cp 08cfc9014c71:/mint/log /tmp/mint-logs' (1/1) Running minio-py tests ... done in 6 seconds

All tests ran successfully