{"action":"opened","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/40595","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/40595/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/40595/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/40595/events","html_url":"https://github.com/saltstack/salt/issues/40595","id":220400624,"number":40595,"title":"Using cmd.shell in pillar results in DeprecationWarning to use cmd.shell instead of cmd.run","user":{"login":"lorengordon","id":8457307,"avatar_url":"https://avatars0.githubusercontent.com/u/8457307?v=3","gravatar_id":"","url":"https://api.github.com/users/lorengordon","html_url":"https://github.com/lorengordon","followers_url":"https://api.github.com/users/lorengordon/followers","following_url":"https://api.github.com/users/lorengordon/following{/other_user}","gists_url":"https://api.github.com/users/lorengordon/gists{/gist_id}","starred_url":"https://api.github.com/users/lorengordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorengordon/subscriptions","organizations_url":"https://api.github.com/users/lorengordon/orgs","repos_url":"https://api.github.com/users/lorengordon/repos","events_url":"https://api.github.com/users/lorengordon/events{/privacy}","received_events_url":"https://api.github.com/users/lorengordon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-08T13:44:30Z","updated_at":"2017-04-08T13:44:30Z","closed_at":null,"body":"### Description of Issue/Question\r\n\r\nWhen I use `cmd.shell` in jinja in a pillar file, I get the DeprecationWarning telling me to use `cmd.shell` instead of `cmd.run`. Except I'm already doing that.\r\n\r\nThe other annoying thing about this is that because pillar is always rendered (at least in masterless mode), the DeprecationWarning appears on _every_ command, even when the pillar and the command are totally unrelated.\r\n\r\n### Setup\r\npillar top.sls:\r\n```\r\nbase:\r\n  '*':\r\n    - foo\r\n```\r\npillar foo.sls\r\n```\r\n{%- set foo = salt.cmd.shell('echo foo') %}\r\n```\r\n\r\n### Steps to Reproduce Issue\r\nRun a salt execution module:\r\n```\r\n# salt-call --local grains.get os\r\n/usr/lib/python2.6/site-packages/salt/utils/templates.py:80: DeprecationWarning: Starting in 2015.5, cmd.run uses python_shell=False by default, which doesn't support shellisms (pipes, env variables, etc). cmd.run is currently aliased to cmd.shell to prevent breakage. Please switch to cmd.shell or set python_shell=True to avoid breakage in the future, when this aliasing is removed.\r\nlocal:\r\n    CentOS\r\n```\r\n\r\n### Versions Report\r\n```\r\nSalt Version:\r\n           Salt: 2016.11.2\r\n\r\nDependency Versions:\r\n           cffi: Not Installed\r\n       cherrypy: Not Installed\r\n       dateutil: Not Installed\r\n          gitdb: Not Installed\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n         Jinja2: 2.8.1\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         pygit2: Not Installed\r\n         Python: 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.10\r\n          PyZMQ: 14.5.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.0.5\r\n\r\nSystem Versions:\r\n           dist: centos 6.8 Final\r\n        machine: x86_64\r\n        release: 2.6.32-642.15.1.el6.x86_64\r\n         system: Linux\r\n        version: CentOS 6.8 Final\r\n```"}}
{"actor":{"display_login":"lorengordon"}}