persistent storage volumes data is deleted when node becomes unresponsive
We have a 3 master , 3 etcd and 3 nodes cluster.
we are running wordpress apps (wordpress app and mysql DB) backed by persistent storage (Amazon EFS) on openshift.
Out of three nodes, one node's(node1) cpu spiked and load average also increased a lot. In that node we had two wordpress and one DB container was running.
since node1 is unresponsive, openshift scheduled those containers in other healthy nodes.
Problem started when node 1 started responding again.
node1 had three containers which ran on node1 had three persistent volumers. suddenly all the three volumes became empty.
i tried adding data again. something is deleting that data again and again.
Deletion didnt stop until i deleted that directory in EFS and created again.
In that time containers which was rescheduled in healthy nodes are running fine till node1 responded.
After data deletion , containeres started restarting.
We have observerd this twice in our environment.
Version
oc v1.3.1 kubernetes v1.3.0+52492b4 features: Basic-Auth GSSAPI Kerberos SPNEGO docker version 1.9.1
Steps To Reproduce
- run apps with persistent storage from amazon EFS
- load a node which runs some containers with persistent storage
- when the node becomes unresponsive, those containers will be placed in new healthy nodes.
- when the unresponsive node responds, data in persistent storage which was attached to that node will vanish
- If we try adding additional data, that also will be deleted
Current Result
all contents of that directory is deleted
Expected Result
When containers are moved to healthy nodes, it should move persistent volume also
Additional Information
i will provide further details when required
What's your persistentVolumeReclaimPolicy of the PV? You should probably set it to Retain if you didn't.
my persistentVolumeReclaimPolicy is Retain only.
One strange this is that after it deleted the entire contents, i tried to repopulate content from a backup and it deleted that also.
I am copying from one end and its deleting from other end.
All those problems are solved after i deleted and created the directory again from EFS itself.
if there are any log files to look at it, i am happy to debug. please assist me
my configuration
Name: pv0005
Labels:
This looks like a duplicate of https://github.com/kubernetes/kubernetes/issues/27653 - OpenShift node can delete content of AWS EBS after node restarts (or gets stuck).
It has been fixed in Origin 1.3.2 in https://github.com/openshift/origin/pull/12024 and 1.4.0 or newer.
Please update and there is a reproducer at https://bugzilla.redhat.com/show_bug.cgi?id=1398417#c0 if you want to try by yourself. Let us know if it helped or not.
I will try and update the results @jsafrane
I reproduced the bug in version 1.3.1 and confirmed it. Then I updated our dev environment from 1.3.1 to 1.4.1. Again i tried to reproduce the bug in version 1.4.1. Its fixed there. Thanks @jsafrane and @childsb