SSL Certificate Issue Encountered When Executing pip.list via Remote Salt Command from Master to Minion in an isolated network
search cancel

SSL Certificate Issue Encountered When Executing pip.list via Remote Salt Command from Master to Minion in an isolated network

book

Article ID: 415444

calendar_today

Updated On:

Products

VMware Tanzu Platform Services - SALT

Issue/Introduction

When calling pip.list in a Salt state from the salt-master the following error occurs when that network does not have access to pypi.org.

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1017)'))) - skipping

Environment

All supported salt-master and salt-minion version

Resolution

It is possible to resolve this issue by setting up a proxy so that pypi.org can be accessed.

It also may be possible to specify the trusted_host key word in the state to avoid this issue. 

install_python_modules:
pip.installed:
- name: mymodule_name
- trusted_host: pypi.org