salt icon indicating copy to clipboard operation
salt copied to clipboard

pillar_source_merging_strategy not working?

Open ksmitdevops opened this issue 11 years ago • 4 comments

Hi,

I have my master configured to use pillar_source_merging_strategy: recurse, however it seems to be behaving as though it is set to overwrite.

/var/salt/pillar/top.sls:

  '^web.*':         {# webs - prod #}
    - match:  pcre
    - environments.prod.web.django.website.testing

environments.prod.web.django.website.testing:

include:
  - environments.prod.web.django.common.testing
  - environments.all.web.django.testing

web_stack_pillar:
  packages:
    installed:
      - nginx-extras

environments.prod.web.django.common.testing:

web_stack_pillar:
  packages:
    installed:
      - waka-waka

environments.all.web.django.testing:

web_stack_pillar:
  packages:
    installed:
      - build-essential
      - curl

I am expecting the output of salt-call pillar.get web_stack_pillar to result in something like this:

local:
    ----------
    packages:
        ----------
        installed:
            - build-essential
            - curl
            - waka-waka
            - nginx-extras

Instead, it is resulting in this:

local:
    ----------
    packages:
        ----------
        installed:
            - build-essential
            - curl

This seems to be the overwrite behavior, whereby the values in environments.all.web.django.testing overwrite everything else. I have refreshed pillar, deleted /var/cache/salt to no avail.

salt-master --versions-report
           Salt: 2014.7.1
         Python: 2.7.3 (default, Mar 13 2014, 11:03:55)
         Jinja2: 2.6
       M2Crypto: 0.21.1
 msgpack-python: 0.1.10
   msgpack-pure: Not Installed
       pycrypto: 2.6
        libnacl: Not Installed
         PyYAML: 3.10
          ioflo: Not Installed
          PyZMQ: 13.1.0
           RAET: Not Installed
            ZMQ: 4.0.4
           Mako: 0.7.0
salt-call --versions-report
           Salt: 2014.7.1
         Python: 2.7.3 (default, Mar 13 2014, 11:03:55)
         Jinja2: 2.6
       M2Crypto: 0.21.1
 msgpack-python: 0.1.10
   msgpack-pure: Not Installed
       pycrypto: 2.6
        libnacl: Not Installed
         PyYAML: 3.10
          ioflo: Not Installed
          PyZMQ: 13.1.0
           RAET: Not Installed
            ZMQ: 4.0.4
           Mako: 0.7.0

ksmitdevops avatar Mar 04 '15 17:03 ksmitdevops

Hmm, I noticed similar behavior with our pillars as well. Same versions (at Ubuntu 14.04). Pretty annoying, haven't found a reason for that yet but sounds similar.

syphernl avatar Mar 04 '15 21:03 syphernl

@schlagify, thanks for the report.

jfindlay avatar Mar 09 '15 18:03 jfindlay

I had a similar issue and applying https://github.com/saltstack/salt/pull/25358 fixed merging of lists for me.

roysjosh avatar Jul 21 '15 14:07 roysjosh

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.

stale[bot] avatar Dec 04 '17 23:12 stale[bot]