{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/38523","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/38523/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/38523/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/38523/events","html_url":"https://github.com/saltstack/salt/issues/38523","id":198436198,"node_id":"MDU6SXNzdWUxOTg0MzYxOTg=","number":38523,"title":"schedule not changed on pillar update after minion restart","user":{"login":"MorphBonehunter","id":4989388,"node_id":"MDQ6VXNlcjQ5ODkzODg=","avatar_url":"https://avatars1.githubusercontent.com/u/4989388?v=4","gravatar_id":"","url":"https://api.github.com/users/MorphBonehunter","html_url":"https://github.com/MorphBonehunter","followers_url":"https://api.github.com/users/MorphBonehunter/followers","following_url":"https://api.github.com/users/MorphBonehunter/following{/other_user}","gists_url":"https://api.github.com/users/MorphBonehunter/gists{/gist_id}","starred_url":"https://api.github.com/users/MorphBonehunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorphBonehunter/subscriptions","organizations_url":"https://api.github.com/users/MorphBonehunter/orgs","repos_url":"https://api.github.com/users/MorphBonehunter/repos","events_url":"https://api.github.com/users/MorphBonehunter/events{/privacy}","received_events_url":"https://api.github.com/users/MorphBonehunter/received_events","type":"User","site_admin":false},"labels":[{"id":41387723,"node_id":"MDU6TGFiZWw0MTM4NzcyMw==","url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21","default":false},{"id":67287385,"node_id":"MDU6TGFiZWw2NzI4NzM4NQ==","url":"https://api.github.com/repos/saltstack/salt/labels/Core","name":"Core","color":"fef2c0","default":false},{"id":41388135,"node_id":"MDU6TGFiZWw0MTM4ODEzNQ==","url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143","default":false},{"id":194766284,"node_id":"MDU6TGFiZWwxOTQ3NjYyODQ=","url":"https://api.github.com/repos/saltstack/salt/labels/P2","name":"P2","color":"155fb5","default":false},{"id":279790660,"node_id":"MDU6TGFiZWwyNzk3OTA2NjA=","url":"https://api.github.com/repos/saltstack/salt/labels/TEAM%20Core","name":"TEAM Core","color":"A9A9A9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestone/13","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"node_id":"MDk6TWlsZXN0b25lOTI2NQ==","number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"node_id":"MDQ6VXNlcjUwNzU5OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/507599?v=4","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":1720,"closed_issues":8207,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2018-09-12T08:07:18Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2017-01-03T09:29:45Z","updated_at":"2018-09-12T14:08:36Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Description of Issue/Question\r\nIf you define an schedule in pillar data the schedule is implemented.\r\nIf you then try to change the schedule interval, the schedule is updated but fails to\r\nupdate the \"_schedule.conf\" File.\r\n\r\n### Setup\r\nDefined an schedule in \"pillars/pandora/init.sls\":\r\n```\r\nschedule:\r\n    underworld_pki_run_state:\r\n        function: state.apply\r\n        minutes: 1\r\n        args:\r\n            - underworld-pki\r\n```\r\nSo the Schedule is implemented:\r\n```\r\n# salt 'pandora*' schedule.list\r\npandora.underworld.lan:\r\n    schedule:\r\n      underworld_pki_run_state:\r\n        args:\r\n        - underworld-pki\r\n        enabled: true\r\n        function: state.apply\r\n        minutes: 1\r\n```\r\nand is running:\r\n```\r\n# tail -f /var/log/salt/minion | grep \"Running scheduled job: underworld_pki_run_state\"\r\n2017-01-03 10:03:37,611 [salt.utils.schedule][INFO    ][23384] Running scheduled job: underworld_pki_run_state\r\n2017-01-03 10:04:37,611 [salt.utils.schedule][INFO    ][23384] Running scheduled job: underworld_pki_run_state\r\n2017-01-03 10:05:37,611 [salt.utils.schedule][INFO    ][23384] Running scheduled job: underworld_pki_run_state\r\n```\r\nThe \"_schedule.conf\" shows:\r\n```\r\nschedule:\r\n  __mine_interval: {enabled: true, function: mine.update, jid_include: true, maxrunning: 2,\r\n    minutes: 60, return_job: false}\r\n  underworld_pki_run_state:\r\n    args: [underworld-pki]\r\n    function: state.apply\r\n    minutes: 1\r\n```\r\n\r\n### Steps to Reproduce Issue\r\nSo now try to alter the timeframe in \"pillars/pandora/init.sls\":\r\n```\r\nschedule:\r\n    underworld_pki_run_state:\r\n        function: state.apply\r\n        minutes: 2\r\n        args:\r\n            - underworld-pki\r\n```\r\nUpdate pillars:\r\n```\r\n# salt 'pandora*' saltutil.refresh_pillar && date\r\npandora.underworld.lan:\r\n    True\r\nDi 3. Jan 10:06:50 CET 2017\r\n```\r\nSo the Schedule shows the right values:\r\n```\r\n# salt 'pandora*' schedule.list\r\npandora.underworld.lan:\r\n    schedule:\r\n      underworld_pki_run_state:\r\n        args:\r\n        - underworld-pki\r\n        enabled: true\r\n        function: state.apply\r\n        minutes: 2\r\n```\r\nand the schedule is running as expected:\r\n```\r\n# tail -f /var/log/salt/minion | grep \"Running scheduled job: underworld_pki_run_state\"\r\n2017-01-03 10:08:37,610 [salt.utils.schedule][INFO    ][23384] Running scheduled job: underworld_pki_run_state\r\n2017-01-03 10:10:37,610 [salt.utils.schedule][INFO    ][23384] Running scheduled job: underworld_pki_run_state\r\n2017-01-03 10:12:37,611 [salt.utils.schedule][INFO    ][23384] Running scheduled job: underworld_pki_run_state\r\n```\r\nBut the \"_schedule.conf\" shows still:\r\n```\r\nschedule:\r\n  __mine_interval: {enabled: true, function: mine.update, jid_include: true, maxrunning: 2,\r\n    minutes: 60, return_job: false}\r\n  underworld_pki_run_state:\r\n    args: [underworld-pki]\r\n    function: state.apply\r\n    minutes: 1\r\n```\r\nSo, now restart the minion:\r\n```\r\n# systemctl restart salt-minion && date\r\nDi 3. Jan 10:16:39 CET 2017\r\n```\r\nand look at the logs:\r\n```\r\n# tail -f /var/log/salt/minion | grep \"Running scheduled job: underworld_pki_run_state\"\r\n2017-01-03 10:16:43,950 [salt.utils.schedule][INFO    ][24129] Running scheduled job: underworld_pki_run_state\r\n2017-01-03 10:17:43,768 [salt.utils.schedule][INFO    ][24129] Running scheduled job: underworld_pki_run_state\r\n2017-01-03 10:18:43,768 [salt.utils.schedule][INFO    ][24129] Running scheduled job: underworld_pki_run_state\r\n```\r\nThe schedule falls back to the 1-Minute intervall, the \"schedule.list\" shows the right stuff:\r\n```\r\npandora.underworld.lan:\r\n    schedule:\r\n      underworld_pki_run_state:\r\n        args:\r\n        - underworld-pki\r\n        enabled: true\r\n        function: state.apply\r\n        minutes: 2\r\n```\r\nAlso an pillar refresh does not work:\r\n```\r\n# salt 'pandora*' saltutil.refresh_pillar && date\r\npandora.underworld.lan:\r\n    True\r\nDi 3. Jan 10:20:13 CET 2017\r\n\r\n# tail -f /var/log/salt/minion | grep \"Running scheduled job: underworld_pki_run_state\"\r\n2017-01-03 10:20:43,768 [salt.utils.schedule][INFO    ][24129] Running scheduled job: underworld_pki_run_state\r\n2017-01-03 10:21:43,768 [salt.utils.schedule][INFO    ][24129] Running scheduled job: underworld_pki_run_state\r\n2017-01-03 10:22:43,767 [salt.utils.schedule][INFO    ][24129] Running scheduled job: underworld_pki_run_state\r\n```\r\nBigger Problem is, that also an change of the timeframe in \"pillars/pandora/init.sls\" does not do anything now:\r\n```\r\nschedule:\r\n    underworld_pki_run_state:\r\n        function: state.apply\r\n        minutes: 5\r\n        args:\r\n            - underworld-pki\r\n```\r\nlooks good:\r\n```\r\n# salt 'pandora*' saltutil.refresh_pillar && date\r\npandora.underworld.lan:\r\n    True\r\nDi 3. Jan 10:23:38 CET 2017\r\n\r\n# salt 'pandora*' schedule.list\r\npandora.underworld.lan:\r\n    schedule:\r\n      underworld_pki_run_state:\r\n        args:\r\n        - underworld-pki\r\n        enabled: true\r\n        function: state.apply\r\n        minutes: 5\r\n```\r\nBut doesn't work:\r\n```\r\n2017-01-03 10:23:43,767 [salt.utils.schedule][INFO    ][24129] Running scheduled job: underworld_pki_run_state\r\n2017-01-03 10:24:43,767 [salt.utils.schedule][INFO    ][24129] Running scheduled job: underworld_pki_run_state\r\n2017-01-03 10:25:43,767 [salt.utils.schedule][INFO    ][24129] Running scheduled job: underworld_pki_run_state\r\n```\r\nContent of \"_schedule.conf\" is still:\r\n```\r\nschedule:\r\n  __mine_interval: {enabled: true, function: mine.update, jid_include: true, maxrunning: 2,\r\n    minutes: 60, return_job: false}\r\n  underworld_pki_run_state:\r\n    args: [underworld-pki]\r\n    function: state.apply\r\n    minutes: 1\r\n```\r\n\r\n### Versions Report\r\nInstalled Salt in Arch Linux.\r\n```\r\nSalt Version:\r\n           Salt: 2016.11.1\r\n \r\nDependency Versions:\r\n           cffi: 1.9.1\r\n       cherrypy: 8.5.0\r\n       dateutil: Not Installed\r\n          gitdb: Not Installed\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n         Jinja2: 2.8\r\n        libgit2: Not Installed\r\n        libnacl: Not Installed\r\n       M2Crypto: 0.24.0\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.8\r\n   mysql-python: Not Installed\r\n      pycparser: 2.17\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n         Python: 2.7.13 (default, Dec 21 2016, 07:16:46)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.12\r\n          PyZMQ: 16.0.2\r\n           RAET: Not Installed\r\n          smmap: Not Installed\r\n        timelib: Not Installed\r\n        Tornado: 4.4.2\r\n            ZMQ: 4.2.0\r\n \r\nSystem Versions:\r\n           dist:   \r\n        machine: x86_64\r\n        release: 4.8.13-1-ARCH\r\n         system: Linux\r\n        version: Not Installed\r\n```\r\n\r\n### Workaround\r\nOnly thing to get this \"reset\":\r\n```\r\nsystemctl stop salt-minion && rm /etc/salt/minion.d/_schedule.conf && systemctl start salt-minion\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/420661970","html_url":"https://github.com/saltstack/salt/issues/38523#issuecomment-420661970","issue_url":"https://api.github.com/repos/saltstack/salt/issues/38523","id":420661970,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDY2MTk3MA==","user":{"login":"stale[bot]","id":26384082,"node_id":"MDM6Qm90MjYzODQwODI=","avatar_url":"https://avatars3.githubusercontent.com/in/1724?v=4","gravatar_id":"","url":"https://api.github.com/users/stale%5Bbot%5D","html_url":"https://github.com/apps/stale","followers_url":"https://api.github.com/users/stale%5Bbot%5D/followers","following_url":"https://api.github.com/users/stale%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/stale%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/stale%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stale%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/stale%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/stale%5Bbot%5D/repos","events_url":"https://api.github.com/users/stale%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/stale%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-09-12T14:08:36Z","updated_at":"2018-09-12T14:08:36Z","author_association":"NONE","body":"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.\n\nIf this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.\n"}}
{"actor":{"display_login":"stale"}}