salt-ssh missing custom grains #67244
Replies: 13 comments
-
@Cptn727, thanks for the report. An ssh minion is designed to operate out of a single directory under |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@jfindlay thanks, I found that the saltutil.sync_grains did not make any change, the command outputs remained identical to those provided above. Hope that's useful feedback. @basepi thanks. Our /etc/salt/grains file is generated at the same time as the salt-minion is being installed on a new box (via salt-call grains.setvals) but maybe there's some way we can adjust this to work for /srv/salt/_grains instead. Also, I may have not been fully clear about it, but this issue is independent of the connectivity. We noticed it because of the connectivity issue, but it exists on all of our local-custom-grains-enabled minions with salt-ssh. Our firewall issue has been corrected, so this is no longer impacting us, but it would be nice to have in case of a future issue. Let me know if I can provide any additional information you might want, or if there's a more "proper" way to rely on salt-ssh for fallback. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Nope, you're using salt-ssh fine. The fallback use case with static grains in /etc/salt/grains is just one we haven't thought about, and we need to address. Will probably just be a config value we support via a command line flag (and master config) to have the minions look for grains at that location. |
Beta Was this translation helpful? Give feedback.
-
I'd also like to see this feature working. I had to do a sort of workaround and |
Beta Was this translation helpful? Give feedback.
-
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. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Beta Was this translation helpful? Give feedback.
-
This problem still exists! |
Beta Was this translation helpful? Give feedback.
-
Thank you for updating this issue. It is no longer marked as stale. |
Beta Was this translation helpful? Give feedback.
-
@saltstack/team-triage |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this is the same issue, but I ran into a problem today where custom grains aren't being run on minion when using salt-ssh. we've got a couple little local ones in our codebase's _grains folder, but they don't get evaluated, even when running |
Beta Was this translation helpful? Give feedback.
-
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. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Beta Was this translation helpful? Give feedback.
-
This would still be nice to have 🙏 |
Beta Was this translation helpful? Give feedback.
-
Thank you for updating this issue. It is no longer marked as stale. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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.
To 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.
For reference, these are the custom grains:
Here is what happens with salt-ssh:
and here is what happens with salt
Here is the versions report (identical for minion and master):
Not sure if this matters at all, but the master is also a syndic.
Beta Was this translation helpful? Give feedback.
All reactions