<p>I have a StatefulSet in Openshift that keeps restarting, but only on a single node. I don't see anything in PODs logs. In <code>/var/log/message</code>s I see only messages that container is restarting, volume is unmounted etc and some more cryptic <code>'error: Container is already stopped'</code> and <code>'cleanup: failed to unmount secrets: invalid argument'</code>.</p>

<p>However, when I look and Yaml for StatefulSet I see the following:</p>

<pre><code>status:
  collisionCount: 1
  currentReplicas: 1
</code></pre>

<p>I suppose this is what is the real cause.<br>
But how can I find out what has generated that collision? </p>

9ilsdx 9rvj 0lo
<p><code>StatefulSets</code> internally perform an snapshot of the data via <code>ControllerRevisions</code> and <a href="https://godoc.org/k8s.io/api/apps/v1#ControllerRevision" rel="nofollow noreferrer">generate a hash for each version</a>.</p>

<p>What the <code>collisionCount</code> indicates is that the <code>ControllerRevision</code> hash collided, likely due to an <a href="https://github.com/kubernetes/kubernetes/issues/61998#issuecomment-403955359" rel="nofollow noreferrer">implementation issue</a>.</p>

<p>You can try to rule this out by getting the controller revisions:</p>

<p><code>$ kubectl get controllerrevisions</code></p>

<p>Since this is an internal mechanism in the object, there is little to do other than recreate the object to generate new hashes that don't collide. There is a <a href="https://github.com/kubernetes/kubernetes/pull/66882" rel="nofollow noreferrer">merged PR</a> that suggests that newer versions shouldn't face this issue. However, <a href="https://github.com/kubernetes/kubernetes/issues/61998#issuecomment-512631430" rel="nofollow noreferrer">it might be the case</a> that you're running a version without this patch.</p>
