-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Allow states to define order: first #24744
Comments
@anlutro I feel like that should be the case. Thanks! |
you can set
For last, it makes sense, cause what salt does is it goes through and looks for anything that has an order: set, and puts those in order... then it takes all other states and orders them with requisites, and then adds 10000 to the last defined order number, and then starts numbering the rest of the states from that. So, you could either do -1... which I don't think it does, or last which is what was decided on. |
I think last and first make just as much sense. I currently put Salt could easily do the same thing as it does with |
Hi. I was quite surprised when I ran into this bug when first in my states didn't go first and in fact when after everything without an order. I opened #34769 with a fix. |
salt/state.py: set `chunk['order'] = 0' with `order: first'; fixes #24744
* upstream/develop: (32 commits) Update 2016.3.2 release notes (saltstack#34850) Skip GCE unit tests - causes test suite to hang Update release notes for 2016.3.2 (saltstack#34848) Fix comment in master config, prevents the service from starting Fix Salt failure after merge of saltstack#34683 drop parsing of vdevs, error passthrough from zpool cli eliminate hardcoded vdev type from zpool state update the state wrapper to include show_low_sls salt.states.zpool - work with updates exec module salt.module.zpool - fix bug with properties on/off being parsed as true/false Check if a valid value is passed to unlyif/unless Fix saltstack#34345 salt.modules.zpool - drop vdev types to make it more future proof, fallback to zpool cli error messages keep this beacon from stack tracing at the loader (saltstack#34825) Skip mysql state test if mysqladmin is not available Lintfix PEP8: E262 salt/state.py: set `chunk['order'] = 0' with `order: first'; fixes saltstack#24744 Lint Document master setting Set up dynamic config ...
It seems inconsistent to allow states to define
order: last
but notorder: first
. I assumed this functionality was present and was surprised to see my state ordered last instead of first.At the very least I think salt should throw an exception if the
order
argument is invalid (i.e. not an int and not the string "last").The text was updated successfully, but these errors were encountered: