saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.14k stars 5.47k forks source link

[BUG] states.rabbitmq_policy.present - specifying apply_to shows change on every highstate #61925

Open xdanik opened 2 years ago

xdanik commented 2 years ago

Description Specifying apply_to parameter in states.rabbitmq_policy.present causes highstate to show change on every highstate. Removing apply_to argument resolves the issue.

----------
          ID: rabbitmq-policy-test
    Function: rabbitmq_policy.present
        Name: test-policy
      Result: True
     Comment: Setting policy "test-policy" for pattern "TestQueue" to "{"max-length": 1000000}" with priority "0" for vhost "/" ...
     Started: 17:40:24.181276
    Duration: 1311.595 ms
     Changes:
              ----------
              new:
                  - Applyto
              old:
                  ----------
                  apply_to:
                      all
                  definition:
                      {"max-length":1000000}
                  pattern:
                      TestQueue
                  priority:
                      0

Setup

rabbitmq-policy-test:
  rabbitmq_policy.present:
    - name: test-policy
    - pattern: TestQueue
    - definition: '{"max-length": 1000000}'
    - priority: 0
    - vhost: '/'
    - apply_to: 'all'

Expected behavior Apply the RabbitMq policy on the first highstate and then do nothing as long as the policy remains unchanged.

Versions Report RabbitMQ server version 3.8.14-1

Salt master:

Salt Version:
          Salt: 3004.1

Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: 2.5.3
     docker-py: Not Installed
         gitdb: 2.0.0
     gitpython: 2.1.1
        Jinja2: 2.9.4
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 0.6.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: 3.6.1
        pygit2: Not Installed
        Python: 3.5.3 (default, Nov  4 2021, 15:29:10)
  python-gnupg: Not Installed
        PyYAML: 3.12
         PyZMQ: 17.1.2
         smmap: 2.0.1
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.2.1

System Versions:
          dist: debian 9 stretch
        locale: UTF-8
       machine: x86_64
       release: 4.9.0-18-amd64
        system: Linux
       version: Debian GNU/Linux 9 stretch

Salt minion:

Salt Version:
          Salt: 3004.1

Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: 2.5.3
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.9.4
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 0.6.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: 3.6.1
        pygit2: Not Installed
        Python: 3.5.3 (default, Nov  4 2021, 15:29:10)
  python-gnupg: Not Installed
        PyYAML: 3.12
         PyZMQ: 17.1.2
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.2.1

System Versions:
          dist: debian 9 stretch
        locale: UTF-8
       machine: x86_64
       release: 4.9.0-14-amd64
        system: Linux
       version: Debian GNU/Linux 9 stretch
welcome[bot] commented 2 years ago

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!