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

Add listen/listen_in support to stateconf.py #34338

Merged
merged 1 commit into from
Jun 28, 2016
Merged

Add listen/listen_in support to stateconf.py #34338

merged 1 commit into from
Jun 28, 2016

Conversation

themalkolm
Copy link
Contributor

Add listen/listen_in everywhere where watch/watch_in is used.

What does this PR do?

Adds listen/listen_in support to stateconf renderer. I blindly added listen everywhere where watch\watch_in is used. Please don't believe me and find somebody who can either verify or reject this.

It does work for me, though. I assume stateconf renderer was written before listen_in was added:

But oh well, I'm not sure about it.

What issues does this PR fix or reference?

stateconf renderer doesn't work in listen and listen_in fields. This is a naive attempt to fix it. Not sure it is done the right way, though.

Previous Behavior

some/state:
  - listen_in:
    - service: .jenkins

.jenkins:
  service.running: []
----------
          ID: listen_.jenkins
    Function: Listen_Error.Listen_Error
        Name: listen_service
      Result: False
     Comment: Referenced state service: .jenkins does not exist
     Started:
    Duration:
     Changes:

New Behavior

----------
          ID: listener_jenkins.config::jenkins
    Function: service.mod_watch
        Name: jenkins
      Result: True
     Comment: Service restarted
     Started: 17:08:20.897331
    Duration: 3024.693 ms
     Changes:
              ----------
              jenkins:
                  True

Tests written?

No

Add `listen/listen_in` everywhere where `watch/watch_in` is used.
@themalkolm
Copy link
Contributor Author

[root@ba936f1e3ab7 pillar]# salt-call --versions-report
Salt Version:
           Salt: 2016.3.0

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.7
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.5 (default, Nov 20 2015, 02:00:19)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.7.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: centos 7.2.1511 Core
        machine: x86_64
        release: 3.10.0-327.18.2.el7.x86_64
         system: Linux
        version: CentOS Linux 7.2.1511 Core

@thatch45
Copy link
Contributor

@themalkolm You are dead on here! This should cleanly add listen into the checks, thanks!

@thatch45 thatch45 merged commit 0b9cb60 into saltstack:2016.3 Jun 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants