operator status typo fix: (#1293)
- don't log normal exists as crashes! - set pod_status.exitCode to the exitCode - count exit code 13 as not-a-crash also (force interrupt)
This commit is contained in:
parent
1bc4697995
commit
ddc4e03422
@ -962,7 +962,6 @@ class BtrixOperator(K8sAPI):
|
||||
|
||||
# detect reason
|
||||
exit_code = terminated.get("exitCode")
|
||||
pod_status.reason = "done"
|
||||
|
||||
if exit_code == 0:
|
||||
pod_status.reason = "done"
|
||||
@ -971,6 +970,8 @@ class BtrixOperator(K8sAPI):
|
||||
else:
|
||||
pod_status.reason = "interrupt: " + str(exit_code)
|
||||
|
||||
pod_status.exitCode = exit_code
|
||||
|
||||
def should_mark_waiting(self, state, started):
|
||||
"""Should the crawl be marked as waiting for capacity?"""
|
||||
if state in RUNNING_STATES:
|
||||
@ -1024,8 +1025,9 @@ class BtrixOperator(K8sAPI):
|
||||
for name, pod in pod_status.items():
|
||||
# log only unexpected exits as crashes
|
||||
# - 0 is success / intended shutdown
|
||||
# - 11 is interrupt / intended restart
|
||||
if not pod.isNewExit or pod.exitCode in (0, 11):
|
||||
# - 11 is default interrupt / intended restart
|
||||
# - 13 is force interrupt / intended restart
|
||||
if not pod.isNewExit or pod.exitCode in (0, 11, 13):
|
||||
continue
|
||||
|
||||
log = self.get_log_line(
|
||||
|
Loading…
Reference in New Issue
Block a user