Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grains state doesn't work (fine) with proxy minions #42300

Closed
mirceaulinic opened this issue Jul 13, 2017 · 2 comments
Closed

Grains state doesn't work (fine) with proxy minions #42300

mirceaulinic opened this issue Jul 13, 2017 · 2 comments
Labels
Bug broken, incorrect, or confusing behavior Grains P3 Priority 3 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@mirceaulinic
Copy link
Contributor

Description of Issue/Question

Taking an arbitrary state, e.g. grains.present, and running the state on a proxy minion:

grain_name:
  grains.present:
    - value: to_be_appended
# salt device1 state.sls grains
device1:
----------
          ID: grain_name
    Function: grains.present
      Result: True
     Comment: Set grain grain_name to to_be_appended
     Started: 21:57:31.580883
    Duration: 35.439 ms
     Changes:
              ----------
              grain_name:
                  to_be_appended

Summary for device1
------------
Succeeded: 1 (changed=1)
Failed:    0
------------
Total states run:     1
Total run time:  35.439 ms

(device1 is a proxy minion)

Although the state was executed successfully, the grain is actually not set:

# salt device1 grains.get grain_name
device1:

However, it is configured under

# cat /etc/salt/grains
grain_name: to_be_appended

I believe this will be waiting for #42074 to be sorted beforehand.

@garethgreenaway garethgreenaway added this to the Approved milestone Jul 14, 2017
@garethgreenaway garethgreenaway added Bug broken, incorrect, or confusing behavior Grains severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P3 Priority 3 labels Jul 14, 2017
mirceaulinic added a commit to cloudflare/salt that referenced this issue Nov 30, 2017
…inion

Similarly to the changes from saltstack#44549, we need to look under in a different
location when saving the static grains, so the grain file is, e.g.,
/etc/salt/proxy.d/{id}/grains.
This solves saltstack#42300.
@mirceaulinic
Copy link
Contributor Author

PR: #44760

@mirceaulinic
Copy link
Contributor Author

Closed via 85451ae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Grains P3 Priority 3 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

2 participants