Skip to content

Pillar environments get compacted. 'env=dev or env=qa or env=prod' is ignored. #21359

Closed

Description

@aidanjl

Pillar environments don't work like salt formula environments.
Eg:

salt '*' state.sls redis3 env=dev

The above command will use formula from 'dev' environment but when it grabs pillar data that pillar data will be a munge of all environments pillar data, not just 'dev'.

Expected behaviour:

Only pillar data from the 'dev' environment is available to the formula.

Activity

  1. eliasp commented on Mar 5, 2015

    @eliasp
    Contributor

    env is deprecated. Use saltenv now.

  2. aidanjl commented on Mar 6, 2015

    @aidanjl
    Author

    same result with 'saltenv'.

    Note the state files work as expected and only grab from specified environment. Its the pillar data that is always compacted across all environments.

  3. aidanjl commented on Mar 9, 2015

    @aidanjl
    Author

    Just wanted to add that this behaviour is present in 2014.7 and was reproduced by Erik Johnson at saltconf using whatever version Erik uses (probably 15.2+).

  4. added
    bug
    severity-medium
    on Mar 9, 2015
  5. added this to the Approved milestone on Mar 9, 2015
  6. jfindlay commented on Mar 9, 2015

    @jfindlay
    Contributor

    @aidanjl, thanks for the report.

  7. samart commented on Mar 29, 2015

    @samart

    i think we are affected by this as we try to figure out environments in general. this + the top file compilation issue.

  8. amendlik commented on Apr 14, 2015

    @amendlik
    Contributor

    There is a feature request to support selecting the pillar environment using a command line argument: #18808.

    I disagree with the 'expected behavior' stated above, which says the pillar environment should be selected based on the state environment. There is nothing that ties together state environments and pillar environments, and there is a lot of value in being able to select them separately.

    I use state environments to indicate the quality/readiness of the formula code (dev, qa, prod, etc.), and pillar environments to configure the systems according to their location (us-east, us-west, sandbox1, etc.). I would like to be able to run something like this:
    salt '*' state.sls redis3 saltenv=prod pillarenv=us-east

  9. thatch45 commented on Apr 17, 2015

    @thatch45
    Contributor

    Yes, @amendlik is right, I am assigning #18808 as a feature for the next release, but this is expected behavior, pillar environments and state environments are different.

  10. aidanjl commented on Apr 18, 2015

    @aidanjl
    Author

    Agreed pillar environment should be its own switch.

    Don't agree this is 'expected behaviour'. Why do pillar environments even exist right now if they always get merged no matter what. I would call this a bug. But glad its being addressed so thank you.

  11. aidanjl commented on Apr 18, 2015

    @aidanjl
    Author

    Just realized this fix isn't targeted for Lithium but the next release Beryllium.

    I really think this should be higher priority, I'm introducing salt to my team and this is core functionality that should just work. Same with the related top file issues, I can handle some cloud integration features missing but this stuff is critical to how salt operates.

  12. jfindlay commented on Apr 18, 2015

    @jfindlay
    Contributor

    @aidanjl, Lithium is about to be released. We're waiting on one or maybe two blockers. Since we've started testing and verifying releases last year, our release cycles have gotten shorter while maintaining or (hopefully) improving the stability of the code.

  13. aidanjl commented on Apr 21, 2015

    @aidanjl
    Author

    Thanks, appreciate all the hard work.

  14. added
    Core
    and removed
    Core
    on May 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreP1Pillarbugseverity-medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions