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
schedule not changed on pillar update after minion restart #38523
Comments
Setting the schedule in the pillar does not change the /etc/salt/minion.d/_schedule.conf file, it just operates as a different place to store the schedule options. You would need to use a schedule.absent or schedule.disabled to change that. The _schedule.conf file is really only there to make sure that the mine gets updated periodically. Nothing else in salt knows about it unless you use the schedule.present/absent states. |
@gtmanfred so if
why is then the "_schedule.conf" updated with:
another question is then, when i do not need an "schedule.present" for implementing the Schedule (as you can see, i only change the pillar data and run saltutil.refresh_pillar) why must i use schedule.absent to get rid of it? |
Actually the schedule can be removed but reapear after minion restart.
The schedule is not executed anymore.
and got executed:
But if i now delete the "_schedule.conf" the schedule disapear (there are still NO changes in the pillar data) after restart of the minion. |
Hrm, i was unaware of this capability. Can you provide the output of running pillar.items? |
Yes, sure (i reduce the output to the relevant sections because of sensitive data).
I get the following pillar item:
After the deletion of the entry in the Pillar File i get:
Mhh...i wonder where the "__update_grains" entry comes from... For completeness, if i change the timeframe the pillar item is updated correct to:
|
I believe the __update_grains comes from /etc/salt/master.d/_schedule.conf on the master |
Mhh...strange the only occurrence of "_schedule.conf" is "/etc/salt/minion.d/_schedule.conf". |
Actually, i was mistaken, this is inserted into the schedule here.
in salt/minion.py |
Ok, i see this in the code...i was not aware that this is found in the pillar data of the minion.
So if i understand this right, persistent schedules (default is true) are placed in this file. |
So if i insert the "persist: False" in the pillar data, the pillar is:
What i did not excpect is that the "_schedule.conf" is still updated:
If i now delete the pillar data, refresh the pillar the schedule stops but the entry persists. But here comes another strange behavior! The "_schedule.conf" is only updated when i do the following steps:
If i do an fresh start:
there are no new entries in the "_schedule.conf"! This changes when you restart the salt-minion with an active Pillar data... |
@gtmanfred this issue is actually on blocked and pending discussussion. |
Yup, sorry i have been busy and forgot to update this. |
Hehe...no Problem. Thanks! |
Hello everybody, I have same troubles with schedules. And it looks like all this scheduler business is a complete mess. Scheduler have 2 sources of jobs: config and pillar, merged with
I believe there are more issues. I am quite new to the project, and dont know enough about it internal structure to propose best solution. But it seems to me that this issues can be resolved easily if only explicit separation of config data management from pillar data can be implemented. PS. All code snippets and from repository branch "develop". |
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. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Description of Issue/Question
If you define an schedule in pillar data the schedule is implemented.
If you then try to change the schedule interval, the schedule is updated but fails to
update the "_schedule.conf" File.
Setup
Defined an schedule in "pillars/pandora/init.sls":
So the Schedule is implemented:
and is running:
The "_schedule.conf" shows:
Steps to Reproduce Issue
So now try to alter the timeframe in "pillars/pandora/init.sls":
Update pillars:
So the Schedule shows the right values:
and the schedule is running as expected:
But the "_schedule.conf" shows still:
So, now restart the minion:
and look at the logs:
The schedule falls back to the 1-Minute intervall, the "schedule.list" shows the right stuff:
Also an pillar refresh does not work:
Bigger Problem is, that also an change of the timeframe in "pillars/pandora/init.sls" does not do anything now:
looks good:
But doesn't work:
Content of "_schedule.conf" is still:
Versions Report
Installed Salt in Arch Linux.
Workaround
Only thing to get this "reset":
The text was updated successfully, but these errors were encountered: