All resources can now set a retry limit (-1 for infinite) and a delay between retries. This applies to both the CheckApply methods, and the Watch methods as well. They each have their own separate counts, but use the same input meta param, since I decided it wouldn't be useful to have a separate watchRetry and watchDelay set of meta parameters. In the process, we got rid of about 15 error cases which would normally panic. This patch required a slight overhaul of the Event system. The previous commit is an earlier version of this patch which I decided to leave in to "show my work" as I used to have to do in math class. It's slightly more correct with the current event system, and this version is less correct and has a few bugs, but that is because the event system needs a massive overhaul, and once that's done this should all work properly for the corner cases.
15 lines
265 B
YAML
15 lines
265 B
YAML
---
|
|
graph: mygraph
|
|
comment: You can test Watch and CheckApply failures with chmod ugo-r and chmod ugo-w.
|
|
resources:
|
|
file:
|
|
- name: file1
|
|
path: "/tmp/mgmt/f1"
|
|
meta:
|
|
retry: 3
|
|
delay: 5000
|
|
content: |
|
|
i am f1
|
|
state: exists
|
|
edges: []
|