{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/30559","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/30559/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/30559/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/30559/events","html_url":"https://github.com/saltstack/salt/issues/30559","id":128227997,"number":30559,"title":"module.wait does not fail when called state fails","user":{"login":"kaidokert","id":2791653,"avatar_url":"https://avatars.githubusercontent.com/u/2791653?v=3","gravatar_id":"","url":"https://api.github.com/users/kaidokert","html_url":"https://github.com/kaidokert","followers_url":"https://api.github.com/users/kaidokert/followers","following_url":"https://api.github.com/users/kaidokert/following{/other_user}","gists_url":"https://api.github.com/users/kaidokert/gists{/gist_id}","starred_url":"https://api.github.com/users/kaidokert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaidokert/subscriptions","organizations_url":"https://api.github.com/users/kaidokert/orgs","repos_url":"https://api.github.com/users/kaidokert/repos","events_url":"https://api.github.com/users/kaidokert/events{/privacy}","received_events_url":"https://api.github.com/users/kaidokert/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Fixed%20Pending%20Verification","name":"Fixed Pending Verification","color":"d4c5f9"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Pending%20Discussion","name":"Pending Discussion","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestones/Blocked","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":374,"closed_issues":767,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2016-03-04T22:58:31Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-01-22T19:36:47Z","updated_at":"2016-03-04T22:58:31Z","closed_at":"2016-03-04T22:58:31Z","body":"Not sure if i'm doing something wrong here, but this does not seem to behave as one would expect. \r\n```salt\r\nnginx_config_file_override:\r\n  file.managed:\r\n    - name: /etc/nginx/nginx.conf\r\n    - source: salt://server_tune/files/nginx.conf\r\n\r\ntest_nginx_config:\r\n  module.wait:\r\n    - name: nginx.configtest\r\n    - watch:\r\n      - file: nginx_config_file_override\r\n```\r\n\r\nModule.wait does get executed when the config file gets updated, but it will always return True regardless if nginx.configtest passes or not.\r\nSample run:\r\n\r\n```\r\n----------\r\n          ID: nginx_config_file_override\r\n    Function: file.managed\r\n        Name: /etc/nginx/nginx.conf\r\n      Result: True\r\n     Comment: File /etc/nginx/nginx.conf updated\r\n     Started: 19:32:14.123340\r\n    Duration: 45.778 ms\r\n     Changes:\r\n              ----------\r\n              diff:\r\n                  ---\r\n                  +++\r\n                  @@ -8,7 +8,7 @@\r\n                  -foo: defbroke;\r\n                  +eating: furrypandas;\r\n----------\r\n          ID: test_nginx_config\r\n    Function: module.wait\r\n        Name: nginx.configtest\r\n      Result: True\r\n     Comment: Module function nginx.configtest executed\r\n     Started: 19:32:14.170061\r\n    Duration: 10.971 ms\r\n     Changes:\r\n              ----------\r\n              ret:\r\n                  ----------\r\n                  comment:\r\n                      Syntax Error\r\n                  result:\r\n                      False\r\n                  stderr:\r\n                      nginx: [emerg] unknown directive \"eating:\" in /etc/nginx/nginx.conf:11\r\n                      nginx: configuration file /etc/nginx/nginx.conf test failed\r\n```\r\n\r\nNotice how nginx.configtest returns False, but test_nginx_config sets Result:True. I would have expected the watching state to fail ? Or i'm missing some bits here ?\r\n\r\n```\r\n salt --versions\r\n                  Salt: 2015.5.3\r\n                Python: 2.7.6 (default, Jun 22 2015, 17:58:13)\r\n                Jinja2: 2.7.2\r\n              M2Crypto: 0.21.1\r\n        msgpack-python: 0.3.0\r\n          msgpack-pure: Not Installed\r\n              pycrypto: 2.6.1\r\n               libnacl: Not Installed\r\n                PyYAML: 3.10\r\n                 ioflo: Not Installed\r\n                 PyZMQ: 14.0.1\r\n                  RAET: Not Installed\r\n                   ZMQ: 4.0.4\r\n                  Mako: Not Installed\r\n               Tornado: Not Installed\r\n Debian source package: 2015.5.3+ds-1trusty1\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/192511618","html_url":"https://github.com/saltstack/salt/issues/30559#issuecomment-192511618","issue_url":"https://api.github.com/repos/saltstack/salt/issues/30559","id":192511618,"user":{"login":"rallytime","id":6547906,"avatar_url":"https://avatars.githubusercontent.com/u/6547906?v=3","gravatar_id":"","url":"https://api.github.com/users/rallytime","html_url":"https://github.com/rallytime","followers_url":"https://api.github.com/users/rallytime/followers","following_url":"https://api.github.com/users/rallytime/following{/other_user}","gists_url":"https://api.github.com/users/rallytime/gists{/gist_id}","starred_url":"https://api.github.com/users/rallytime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rallytime/subscriptions","organizations_url":"https://api.github.com/users/rallytime/orgs","repos_url":"https://api.github.com/users/rallytime/repos","events_url":"https://api.github.com/users/rallytime/events{/privacy}","received_events_url":"https://api.github.com/users/rallytime/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T22:58:31Z","updated_at":"2016-03-04T22:58:31Z","body":"I have back-ported the commit mentioned above that fixes the issue with `module.py`. I am not sure if we will be releasing from 2015.5 again or not, but if we do, at least now this fix will be there. \r\n\r\nSince the discussion about moving from the launchpad PPA has already been addressed in terms of upgrading to new salt versions, I'm going to close this as resolved. Thanks!"}}