{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/31501","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/31501/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/31501/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/31501/events","html_url":"https://github.com/saltstack/salt/issues/31501","id":136550694,"node_id":"MDU6SXNzdWUxMzY1NTA2OTQ=","number":31501,"title":"Salt states fail with error  'Failed to return clean data' when using salt-ssh in Amazon EC2 ","user":{"login":"grep4linux","id":4633821,"node_id":"MDQ6VXNlcjQ2MzM4MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/4633821?v=4","gravatar_id":"","url":"https://api.github.com/users/grep4linux","html_url":"https://github.com/grep4linux","followers_url":"https://api.github.com/users/grep4linux/followers","following_url":"https://api.github.com/users/grep4linux/following{/other_user}","gists_url":"https://api.github.com/users/grep4linux/gists{/gist_id}","starred_url":"https://api.github.com/users/grep4linux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grep4linux/subscriptions","organizations_url":"https://api.github.com/users/grep4linux/orgs","repos_url":"https://api.github.com/users/grep4linux/repos","events_url":"https://api.github.com/users/grep4linux/events{/privacy}","received_events_url":"https://api.github.com/users/grep4linux/received_events","type":"User","site_admin":false},"labels":[{"id":41387723,"node_id":"MDU6TGFiZWw0MTM4NzcyMw==","url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21","default":false},{"id":67287385,"node_id":"MDU6TGFiZWw2NzI4NzM4NQ==","url":"https://api.github.com/repos/saltstack/salt/labels/Core","name":"Core","color":"fef2c0","default":false},{"id":41388135,"node_id":"MDU6TGFiZWw0MTM4ODEzNQ==","url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143","default":false},{"id":194766164,"node_id":"MDU6TGFiZWwxOTQ3NjYxNjQ=","url":"https://api.github.com/repos/saltstack/salt/labels/P1","name":"P1","color":"2181ee","default":false},{"id":67287557,"node_id":"MDU6TGFiZWw2NzI4NzU1Nw==","url":"https://api.github.com/repos/saltstack/salt/labels/Salt-SSH","name":"Salt-SSH","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestone/13","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"node_id":"MDk6TWlsZXN0b25lOTI2NQ==","number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"node_id":"MDQ6VXNlcjUwNzU5OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/507599?v=4","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":1913,"closed_issues":7875,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2018-07-28T23:37:03Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-02-25T23:57:36Z","updated_at":"2018-07-29T14:37:02Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Salt states fail with error  'Failed to return clean data' when using salt-ssh in Amazon EC2 when applying a state as non-root user**\n### Expected Behavior\n\nStates should successfully apply over Salt SSH if `sudo: True` is set when the SSH connection is from a non-root user that is in the sodoers.\n- WORKING command\n  `salt-ssh test-minion status.uptime`\n- EXPECTED WORKING command\n  `salt-ssh test-minion state.sls setup.test`\n### Actual Behavior\n- EXPECTED WORKING command\n  `salt-ssh test-minion state.sls setup.test`\n\n```\n# key fragments from large output\n...\n _error:\n        Failed to return clean data\n...\nretcode:\n        0\n    stderr:\n        Connection to 172.31.5.246 closed.\n...\n```\n### Steps to Reproduce Issue\n\n Create 2 CentOS 6.5 or CentOS 7.x image VMS in AWS.\nInstall Salt master and Salt-ssh on one VM\nSetup roster in the following format:\n\n```\n# file: /etc/salt/roster (fragment)\ntest-minion:\n  host : <your-IP>\n  priv: /etc/salt/your_key.pem\n  user: <your-non-root-user>\n  sudo: True\n  tty: True\n```\n\nCreate a simple state:\n\n```\n# test state\npush_text:\n  file.managed:\n    - name: /etc/foobar.txt\n    - contents: \n       - 'version: 2.0'\n       - 'Test'\n```\n\nRun the following command to see the error:\n\n```\nsalt-ssh test-minion state.sls setup.test \nor \nsalt-ssh test-minion state.sls setup.test |less\n```\n\nNOTE: Re-created in VirtualBox on local workstation, but does not exhibit any errors.\n\nIf I use a new CentOS 7.0 AWS image that uses a non-root 'ec2-user' account then it appears that I make an salt-ssh connection, but it disconnects immediately and does not apply the state.  \n\nI first tried running the master in a virtualbox on my workstation and then salt-ssh to minions in AWS.  This has worked for months if the image allows for root ssh.  However, thinking that  there might be a network issue between my workstation and AWS, I created a VM in AWS in the same VPC and then tried the salt-ssh again with the same error.  The ec2-user is in the sudo's file so system permissions seem to be set correctly.\n\nI did run into bug https://github.com/saltstack/salt/issues/18425 , but manually applied the fix and got past that. \n### Versions Report\n\n*\\* Provided by running `salt --versions-report`**\n\n```\n# salt-ssh --versions-report\nSalt Version:\n           Salt: 2015.8.7\n\nDependency Versions:\n         Jinja2: 2.2.1\n       M2Crypto: 0.20.2\n           Mako: Not Installed\n         PyYAML: 3.11\n          PyZMQ: 14.5.0\n         Python: 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)\n           RAET: Not Installed\n        Tornado: 4.2.1\n            ZMQ: 4.0.5\n           cffi: Not Installed\n       cherrypy: 3.2.2\n       dateutil: Not Installed\n          gitdb: Not Installed\n      gitpython: Not Installed\n          ioflo: Not Installed\n        libgit2: 0.20.0\n        libnacl: Not Installed\n   msgpack-pure: Not Installed\n msgpack-python: 0.4.6\n   mysql-python: Not Installed\n      pycparser: Not Installed\n       pycrypto: 2.6.1\n         pygit2: 0.20.3\n   python-gnupg: Not Installed\n          smmap: Not Installed\n        timelib: Not Installed\n\nSystem Versions:\n           dist: centos 6.5 Final\n        machine: x86_64\n        release: 2.6.32-431.el6.x86_64\n         system: CentOS 6.5 Final\n```\n### Relevant Logs, Configs, or States\n\nSee attachement for full log.\n[salt-ssh-err.txt](https://github.com/saltstack/salt/files/147477/salt-ssh-err.txt)\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/408682035","html_url":"https://github.com/saltstack/salt/issues/31501#issuecomment-408682035","issue_url":"https://api.github.com/repos/saltstack/salt/issues/31501","id":408682035,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODY4MjAzNQ==","user":{"login":"stale[bot]","id":26384082,"node_id":"MDM6Qm90MjYzODQwODI=","avatar_url":"https://avatars3.githubusercontent.com/in/1724?v=4","gravatar_id":"","url":"https://api.github.com/users/stale%5Bbot%5D","html_url":"https://github.com/apps/stale","followers_url":"https://api.github.com/users/stale%5Bbot%5D/followers","following_url":"https://api.github.com/users/stale%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/stale%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/stale%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stale%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/stale%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/stale%5Bbot%5D/repos","events_url":"https://api.github.com/users/stale%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/stale%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-07-29T14:37:02Z","updated_at":"2018-07-29T14:37:02Z","author_association":"NONE","body":"This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n\nIf this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.\n"}}
{"actor":{"display_login":"stale"}}