{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/25713","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/25713/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/25713/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/25713/events","html_url":"https://github.com/saltstack/salt/issues/25713","id":97145332,"node_id":"MDU6SXNzdWU5NzE0NTMzMg==","number":25713,"title":"salt-ssh missing custom grains","user":{"login":"Cptn727","id":12445368,"node_id":"MDQ6VXNlcjEyNDQ1MzY4","avatar_url":"https://avatars1.githubusercontent.com/u/12445368?v=4","gravatar_id":"","url":"https://api.github.com/users/Cptn727","html_url":"https://github.com/Cptn727","followers_url":"https://api.github.com/users/Cptn727/followers","following_url":"https://api.github.com/users/Cptn727/following{/other_user}","gists_url":"https://api.github.com/users/Cptn727/gists{/gist_id}","starred_url":"https://api.github.com/users/Cptn727/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cptn727/subscriptions","organizations_url":"https://api.github.com/users/Cptn727/orgs","repos_url":"https://api.github.com/users/Cptn727/repos","events_url":"https://api.github.com/users/Cptn727/events{/privacy}","received_events_url":"https://api.github.com/users/Cptn727/received_events","type":"User","site_admin":false},"labels":[{"id":67287385,"node_id":"MDU6TGFiZWw2NzI4NzM4NQ==","url":"https://api.github.com/repos/saltstack/salt/labels/Core","name":"Core","color":"fef2c0","default":false},{"id":204655,"node_id":"MDU6TGFiZWwyMDQ2NTU=","url":"https://api.github.com/repos/saltstack/salt/labels/Feature","name":"Feature","color":"009800","default":false},{"id":43090649,"node_id":"MDU6TGFiZWw0MzA5MDY0OQ==","url":"https://api.github.com/repos/saltstack/salt/labels/Help%20Wanted","name":"Help Wanted","color":"009800","default":false},{"id":194766324,"node_id":"MDU6TGFiZWwxOTQ3NjYzMjQ=","url":"https://api.github.com/repos/saltstack/salt/labels/P4","name":"P4","color":"031a39","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":{"login":"basepi","id":702318,"node_id":"MDQ6VXNlcjcwMjMxOA==","avatar_url":"https://avatars2.githubusercontent.com/u/702318?v=4","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"assignees":[{"login":"basepi","id":702318,"node_id":"MDQ6VXNlcjcwMjMxOA==","avatar_url":"https://avatars2.githubusercontent.com/u/702318?v=4","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false}],"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":1477,"closed_issues":8658,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2018-12-11T21:53:06Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-07-24T20:55:49Z","updated_at":"2018-12-11T21:53:25Z","closed_at":null,"author_association":"NONE","body":"Due to a firewall snafu, some of my minions lost connectivity to the salt-master today, but I could still ssh from the master to the minion. So I tried to use salt-ssh but discovered that custom grains were missing.\n\nTo illustrate the problem, I have reproduced it on a minion which is not having the connectivity issue, so I can show the comparison to the output from the regular salt command. Summarily, the issue is that default grains (id, fqdn_ip4, etc.) are present, but custom grains set in /etc/salt/grains are not.\n\nFor reference, these are the custom grains:\n\n```\nroot@CT1-ETSYSADMINPROXY1:~#  salt-ssh -i CT1-ETCASSDEV1 cmd.run 'cat /etc/salt/grains'\nCT1-ETCASSDEV1:\n    dc: cn1\n    dom: ef_com\n    env: dev\n    et_role:\n    - cass\n```\n\nHere is what happens with salt-ssh:\n\n```\nroot@CT1-ETSYSADMINPROXY1:~#  salt-ssh -i CT1-ETCASSDEV1 grains.get dom\n[CRITICAL] Pillar render error: Rendering Primary Top file failed, render error:\nJinja variable 'dict object' has no attribute 'dc'\nCT1-ETCASSDEV1:\nroot@CT1-ETSYSADMINPROXY1:~#  salt-ssh -i CT1-ETCASSDEV1 grains.get id\n[CRITICAL] Pillar render error: Rendering Primary Top file failed, render error:\nJinja variable 'dict object' has no attribute 'dc'\nCT1-ETCASSDEV1:\n    CT1-ETCASSDEV1\n```\n\nand here is what happens with salt\n\n```\nroot@CT1-ETSYSADMINPROXY1:~#  salt CT1-ETCASSDEV1 grains.get dom\nCT1-ETCASSDEV1:\n    ef_com\nroot@CT1-ETSYSADMINPROXY1:~#  salt CT1-ETCASSDEV1 grains.get id\nCT1-ETCASSDEV1:\n    CT1-ETCASSDEV1\n```\n\nHere is the versions report (identical for minion and master):\n\n``` yaml\n                  Salt: 2015.5.2\n                Python: 2.7.6 (default, Jun 22 2015, 17:58:13)\n                Jinja2: 2.7.2\n              M2Crypto: 0.21.1\n        msgpack-python: 0.3.0\n          msgpack-pure: Not Installed\n              pycrypto: 2.6.1\n               libnacl: Not Installed\n                PyYAML: 3.10\n                 ioflo: Not Installed\n                 PyZMQ: 14.0.1\n                  RAET: Not Installed\n                   ZMQ: 4.0.4\n                  Mako: 0.9.1\n Debian source package: 2015.5.2+ds-1trusty1\n```\n\nNot sure if this matters at all, but the master is also a syndic.\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/446376547","html_url":"https://github.com/saltstack/salt/issues/25713#issuecomment-446376547","issue_url":"https://api.github.com/repos/saltstack/salt/issues/25713","id":446376547,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjM3NjU0Nw==","user":{"login":"basepi","id":702318,"node_id":"MDQ6VXNlcjcwMjMxOA==","avatar_url":"https://avatars2.githubusercontent.com/u/702318?v=4","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"created_at":"2018-12-11T21:53:25Z","updated_at":"2018-12-11T21:53:25Z","author_association":"MEMBER","body":"@saltstack/team-triage "}}
{"actor":{"display_login":"basepi"}}