You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you do?
call Set() twice in a row, or Unset() twice in a row. If an operator is going to intelligently change the value of its readiness probe during runtime, there is a chance that multiple events will result in the value being set or unset.
For example, consider a case where an operator starts and begins an upgrade workflow. It sets not-ready as requested by OLM. If something goes wrong and the operator exits with an error, the last thing that will happen in main.go (based on a defer statement) will be to call Unset(). That will result in an error, because the file will be not-found.
What did you expect to see?
No error returned.
What did you see instead? Under which circumstances?
Error returned
Environment
operator-sdk version:
0.9.0
Possible Solution
If Set() finds that the file already exists, return nil.
If Unset() fails to unlink the file because it doesn't exist, return nil.
The text was updated successfully, but these errors were encountered:
djzager
added a commit
to djzager/operator-sdk
that referenced
this issue
Jul 31, 2019
Bug Report
What did you do?
call
Set()
twice in a row, orUnset()
twice in a row. If an operator is going to intelligently change the value of its readiness probe during runtime, there is a chance that multiple events will result in the value being set or unset.For example, consider a case where an operator starts and begins an upgrade workflow. It sets not-ready as requested by OLM. If something goes wrong and the operator exits with an error, the last thing that will happen in main.go (based on a
defer statement
) will be to callUnset()
. That will result in an error, because the file will be not-found.What did you expect to see?
No error returned.
What did you see instead? Under which circumstances?
Error returned
Environment
0.9.0
Possible Solution
If
Set()
finds that the file already exists, returnnil
.If
Unset()
fails to unlink the file because it doesn't exist, returnnil
.The text was updated successfully, but these errors were encountered: