{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/46611","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/46611/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/46611/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/46611/events","html_url":"https://github.com/saltstack/salt/issues/46611","id":306612772,"number":46611,"title":"pip.installed not available with pip 9.0.2","user":{"login":"Autophagy","id":12958979,"avatar_url":"https://avatars0.githubusercontent.com/u/12958979?v=4","gravatar_id":"","url":"https://api.github.com/users/Autophagy","html_url":"https://github.com/Autophagy","followers_url":"https://api.github.com/users/Autophagy/followers","following_url":"https://api.github.com/users/Autophagy/following{/other_user}","gists_url":"https://api.github.com/users/Autophagy/gists{/gist_id}","starred_url":"https://api.github.com/users/Autophagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Autophagy/subscriptions","organizations_url":"https://api.github.com/users/Autophagy/orgs","repos_url":"https://api.github.com/users/Autophagy/repos","events_url":"https://api.github.com/users/Autophagy/events{/privacy}","received_events_url":"https://api.github.com/users/Autophagy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-19T20:01:08Z","updated_at":"2018-03-19T20:09:40Z","closed_at":null,"author_association":"NONE","body":"### Description of Issue/Question\r\n\r\nAttempting to run highstate against a minion with multiple pip.installed definitions results in an exception:\r\n\r\n```\r\nState 'pip.installed' was not found in SLS 'k8s'\r\nReason: 'pip.installed' is not available.\r\n````\r\n\r\nHowever, this only occurs if the pip version is **9.0.2**, and not if the pip version **9.0.1**. When the pip version is 9.0.1, the highstate functions normally. This occurs regardless of whether I refresh the modules.\r\n\r\n### Setup\r\n(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)\r\n\r\n```\r\nkubernetes:\r\n  pip.installed: \r\n    - name: kubernetes==3.0\r\n    - reload_modules: True\r\n```\r\n\r\n### Steps to Reproduce Issue\r\nDefine the pip.installed definition as above, install pip 9.0.2 on the minion. Results in:\r\n\r\n```\r\n          ID: kubernetes\r\n    Function: pip.installed\r\n        Name: kubernetes==3.0\r\n      Result: False\r\n     Comment: State 'pip.installed' was not found in SLS 'k8s'\r\n              Reason: 'pip.installed' is not available.\r\n```\r\n\r\nIf run on the minion:\r\n\r\n```\r\n[root@node ~]$ sudo salt-call state.highstate\r\n[ERROR   ] Failed to import states pip_state, this is due most likely to a syntax error:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/site-packages/salt/loader.py\", line 1412, in _load_module\r\n    mod = imp.load_module(mod_namespace, fn_, fpath, desc)\r\n  File \"/usr/lib/python2.7/site-packages/salt/states/pip_state.py\", line 37, in <module>\r\n    import pip\r\n  File \"/usr/lib/python2.7/site-packages/pip-9.0.2-py2.7.egg/pip/__init__.py\", line 45, in <module>\r\n    from pip.vcs import git, mercurial, subversion, bazaar  # noqa\r\n  File \"/usr/lib/python2.7/site-packages/pip-9.0.2-py2.7.egg/pip/vcs/mercurial.py\", line 9, in <module>\r\n    from pip.download import path_to_url\r\n  File \"/usr/lib/python2.7/site-packages/pip-9.0.2-py2.7.egg/pip/download.py\", line 40, in <module>\r\n    from pip._vendor import requests, six\r\n  File \"/usr/lib/python2.7/site-packages/pip-9.0.2-py2.7.egg/pip/_vendor/requests/__init__.py\", line 98, in <module>\r\n    from . import packages\r\n  File \"/usr/lib/python2.7/site-packages/pip-9.0.2-py2.7.egg/pip/_vendor/requests/packages.py\", line 12, in <module>\r\n    sys.modules['pip._vendor.requests.packages.' + mod] = sys.modules[\"pip._vendor.\" + mod]\r\nKeyError: 'pip._vendor.urllib3.urllib'\r\n```\r\n\r\nDowngrade pip to 9.0.1 (with ``pip install pip==9.0.1``) and the highstate is correctly applied. \r\n\r\n### Versions Report\r\n\r\n```\r\nSalt Version:\r\n           Salt: 2017.7.4\r\n \r\nDependency Versions:\r\n           cffi: Not Installed\r\n       cherrypy: Not Installed\r\n       dateutil: 2.7.0\r\n      docker-py: 1.10.6\r\n          gitdb: Not Installed\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n         Jinja2: 2.7.2\r\n        libgit2: Not Installed\r\n        libnacl: Not Installed\r\n       M2Crypto: Not Installed\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.6\r\n   mysql-python: Not Installed\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n   pycryptodome: Not Installed\r\n         pygit2: Not Installed\r\n         Python: 2.7.5 (default, Aug  4 2017, 00:39:18)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.12\r\n          PyZMQ: 15.3.0\r\n           RAET: Not Installed\r\n          smmap: Not Installed\r\n        timelib: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.1.4\r\n \r\nSystem Versions:\r\n           dist: centos 7.4.1708 Core\r\n         locale: UTF-8\r\n        machine: x86_64\r\n        release: 3.10.0-693.21.1.el7.x86_64\r\n         system: Linux\r\n        version: CentOS Linux 7.4.1708 Core\r\n```\r\n\r\nNo difference between master and minion versions."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/374354842","html_url":"https://github.com/saltstack/salt/issues/46611#issuecomment-374354842","issue_url":"https://api.github.com/repos/saltstack/salt/issues/46611","id":374354842,"user":{"login":"Autophagy","id":12958979,"avatar_url":"https://avatars0.githubusercontent.com/u/12958979?v=4","gravatar_id":"","url":"https://api.github.com/users/Autophagy","html_url":"https://github.com/Autophagy","followers_url":"https://api.github.com/users/Autophagy/followers","following_url":"https://api.github.com/users/Autophagy/following{/other_user}","gists_url":"https://api.github.com/users/Autophagy/gists{/gist_id}","starred_url":"https://api.github.com/users/Autophagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Autophagy/subscriptions","organizations_url":"https://api.github.com/users/Autophagy/orgs","repos_url":"https://api.github.com/users/Autophagy/repos","events_url":"https://api.github.com/users/Autophagy/events{/privacy}","received_events_url":"https://api.github.com/users/Autophagy/received_events","type":"User","site_admin":false},"created_at":"2018-03-19T20:09:40Z","updated_at":"2018-03-19T20:09:40Z","author_association":"NONE","body":"I believe this might be the same issue mentioned here: https://github.com/saltstack/salt/issues/44980#issuecomment-374125632"}}
{"actor":{"display_login":"Autophagy"}}