Period task interval config values need to be consistent
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Matthew Gilliard |
Bug Description
Currently we have a mix of “==0” and “<=0” being used inside periodic tasks to decide to skip the task altogether. We also have the “spacing=” option in the periodic_task decorator to determine how often to call the task, but in this case: ==0 means “call at default interval” and <0 means “never call”. It would be nice to make these consistent so that all tasks can use the spacing option rather than keep their own check on when (and if) they need to run.
However in order to do this cleanly and not break anyone that is currently using “0 “ to mean “don’t run” we need to:
- Change the default values that are currently 0 to -1
- Log a deprecation warning for the use “*_interval=0”
And then leave this in place until Juno before making the change
Changed in nova: | |
status: | New → Triaged |
importance: | Undecided → Low |
milestone: | none → icehouse-3 |
tags: | added: low-hanging-fruit |
Changed in nova: | |
assignee: | nobody → Matthew Gilliard (matthew-gilliard-u) |
Changed in nova: | |
status: | Triaged → In Progress |
Changed in nova: | |
milestone: | icehouse-3 → icehouse-rc1 |
Changed in nova: | |
milestone: | icehouse-rc1 → next |
tags: | added: icehouse-rc-potential |
tags: |
added: icehouse-backport-potential removed: icehouse-rc-potential |
Changed in nova: | |
milestone: | none → kilo-1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-1 → 2015.1.0 |
So, just to be clear - is it the intention that in all cases:
- 0 means "use the default polling period"
- any negative value means "never run this"?