{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/30960","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/30960/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/30960/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/30960/events","html_url":"https://github.com/saltstack/salt/issues/30960","id":131797555,"number":30960,"title":"schedule.present Result: Clean when not actually clean","user":{"login":"Phomias","id":4073894,"avatar_url":"https://avatars.githubusercontent.com/u/4073894?v=3","gravatar_id":"","url":"https://api.github.com/users/Phomias","html_url":"https://github.com/Phomias","followers_url":"https://api.github.com/users/Phomias/followers","following_url":"https://api.github.com/users/Phomias/following{/other_user}","gists_url":"https://api.github.com/users/Phomias/gists{/gist_id}","starred_url":"https://api.github.com/users/Phomias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phomias/subscriptions","organizations_url":"https://api.github.com/users/Phomias/orgs","repos_url":"https://api.github.com/users/Phomias/repos","events_url":"https://api.github.com/users/Phomias/events{/privacy}","received_events_url":"https://api.github.com/users/Phomias/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-06T00:36:45Z","updated_at":"2016-02-07T23:58:56Z","closed_at":null,"body":"Given a minion which has no jobs scheduled:\r\n```\r\n[ec2-user@aws-management ~]$ sudo salt 'www4*' schedule.list                                                                              \r\nwww4.example.com:\r\n    ----------\r\n    schedule:\r\n        ----------\r\n```\r\nWhen pushing a `schedule.present` for the first time I would expect `Result: True` but instead I get `Result: Clean`\r\n```\r\n[ec2-user@aws-management ~]$ sudo salt --state-output=changes 'www4*' state.sls_id php-fpm-memory-leak-workaround php54                   \r\nwww4.example.com:\r\n  ...[redact 17 clean states which were requirements of the schedule.present]...\r\n  Name: php-fpm-memory-leak-workaround - Function: schedule.present - Result: Clean\r\n\r\nSummary\r\n-------------\r\nSucceeded: 18\r\nFailed:     0\r\n-------------\r\nTotal states run:     18\r\n```\r\nNext I checked and saw that it did actually apply the state luckily:\r\n```\r\n[ec2-user@aws-management ~]$ sudo salt 'www4*' schedule.list\r\nwww4.example.com:\r\n    schedule:\r\n      php-fpm-memory-leak-workaround:\r\n        args:\r\n        - php-fpm\r\n        enabled: true\r\n        function: service.reload\r\n        jid_include: true\r\n        maxrunning: 1\r\n        name: php-fpm-memory-leak-workaround\r\n        seconds: 3600\r\n        splay: 600\r\n```\r\nEdit: I noticed the next command I ran, with `test=True` ended up showing a diff when I would expect it to be `Result: Clean`:\r\n```\r\n[ec2-user@aws-management ~]$ sudo salt --state-output=changes 'www*' state.sls_id php-fpm-memory-leak-workaround php54 test=True          \r\nwww4.example.com:\r\n  [redact 17 clean states]\r\n----------\r\n          ID: php-fpm-memory-leak-workaround\r\n    Function: schedule.present\r\n      Result: True\r\n     Comment: Job: php-fpm-memory-leak-workaround would be modified in schedule.\r\n     Started: 00:41:58.753147\r\n    Duration: 0.584 ms\r\n     Changes:   \r\n              ----------\r\n              diff:\r\n                  ---  \r\n                  +++  \r\n                  @@ -1,5 +1,4 @@\r\n                   args:['php-fpm']\r\n                  -enabled:True\r\n                   function:service.reload\r\n                   jid_include:True\r\n                   maxrunning:1\r\n```\r\n\r\nHere are my versions:\r\n```\r\n[ec2-user@aws-management ~]$ salt --versions\r\n           Salt: 2015.5.8\r\n         Python: 2.6.9 (unknown, Dec 17 2015, 01:08:55)\r\n         Jinja2: 2.7.2\r\n       M2Crypto: 0.21.1\r\n msgpack-python: 0.4.6\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.3.1\r\n           RAET: Not Installed\r\n            ZMQ: 3.2.5\r\n           Mako: Not Installed\r\n        Tornado: 4.1\r\n        timelib: Not Installed\r\n       dateutil: 2.1\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/181144548","html_url":"https://github.com/saltstack/salt/issues/30960#issuecomment-181144548","issue_url":"https://api.github.com/repos/saltstack/salt/issues/30960","id":181144548,"user":{"login":"garethgreenaway","id":718525,"avatar_url":"https://avatars.githubusercontent.com/u/718525?v=3","gravatar_id":"","url":"https://api.github.com/users/garethgreenaway","html_url":"https://github.com/garethgreenaway","followers_url":"https://api.github.com/users/garethgreenaway/followers","following_url":"https://api.github.com/users/garethgreenaway/following{/other_user}","gists_url":"https://api.github.com/users/garethgreenaway/gists{/gist_id}","starred_url":"https://api.github.com/users/garethgreenaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethgreenaway/subscriptions","organizations_url":"https://api.github.com/users/garethgreenaway/orgs","repos_url":"https://api.github.com/users/garethgreenaway/repos","events_url":"https://api.github.com/users/garethgreenaway/events{/privacy}","received_events_url":"https://api.github.com/users/garethgreenaway/received_events","type":"User","site_admin":false},"created_at":"2016-02-07T23:58:56Z","updated_at":"2016-02-07T23:58:56Z","body":"All a result of using sls_id I suspect, I'm not overly familiar with that function in the state module  Do you see the same results if you're using state.sls?"}}