1
0
mirror of https://github.com/rancher/norman.git synced 2025-07-04 02:56:42 +00:00
Commit Graph

18 Commits

Author SHA1 Message Date
Darren Shepherd
3632a2ab7a Add Track method 2018-11-26 08:33:11 -07:00
Yuki Nishiwaki
b18da6edc4 Allow to put Reason in controller.ForgetError
Norman Condition automatically generate condition information based on
the error the handler would return in Condition.Do function.
handler function usually return 2 types of error. the error can be
ignored and the error can not be ignored.
According to current implementation, Condition.Do function generate
condition with error state even if handler return error can be ignored.
The error that can be ignored should be ignored in the context of
condition as well.

So this commit introduce new field which is Reason to ForgetError so
that the developer can put special reason other than Error when
ForgetError is expected to happen by expected procedure like
provisioning and wait for something and Norman Condintion respect to
this field when try to generate condition information based on error

This solution will help us to fix this rancher bug
https://github.com/rancher/rancher/issues/15907
2018-10-03 02:44:42 +09:00
Daishan Peng
643868f4a6 add method to compare if error has tmp file path
add a method to check if the error message contains a tmp file path. It
is to prevent updating resource's condition forever and causing the
controller flapping. https://github.com/rancher/rancher/issues/15103
2018-08-17 15:39:50 -07:00
Darren Shepherd
339468f119 Only record forgetError if there is no message at all 2018-02-06 05:03:25 +00:00
Darren Shepherd
d63581239c Fix non-updating condition 2018-02-03 06:44:14 +00:00
Darren Shepherd
ac16cabfd1 Make conditions not modify as much 2018-01-22 23:45:38 +00:00
Daishan Peng
1e15dbfbdc fix nil pointer exceptions 2018-01-22 22:57:59 +00:00
Darren Shepherd
9e6ea56442 Changes to make conditions less chatty 2018-01-17 22:44:12 +00:00
Darren Shepherd
d1b13df896 Make conditions update less and communicate error better 2018-01-17 01:06:57 +00:00
Darren Shepherd
cdb90f4937 Only touch timestamp if the condition value actually changed 2018-01-16 19:54:43 +00:00
Darren Shepherd
7d895bb074 Handle non-nil interfaces with nil values 2018-01-16 05:10:36 +00:00
Darren Shepherd
6b8f570871 DoUntilTrue should never set to False 2018-01-12 14:39:58 +00:00
Craig Jellick
399b7d3e3a DoUntilTrue condition function 2018-01-08 19:34:18 +00:00
Craig Jellick
0b2c60dc92 Always set message on conditions
and default reason to "Error" if no specific reason is specified
2017-12-28 10:05:15 -07:00
Craig Jellick
02738370b1 Return object from Do function 2017-12-27 19:46:37 +00:00
Craig Jellick
fb1a80ccc1 Add support for message field on condition 2017-12-27 19:46:37 +00:00
Darren Shepherd
2825fdb9c3 Fix Do method 2017-12-18 15:19:44 -07:00
Darren Shepherd
7137b23d04 Conditions framework 2017-12-16 01:30:46 -07:00