-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failover of noobaa-db-pg0 works but fall back leaves pod in CrashLoopback #6953
Comments
This will be a blocker to our testing b/c I am assigned failvoer/fallback testing. |
Romy debugged this issue on other cluster and find a link relate to this sclorg/postgresql-container#166 |
@MonicaLemay , we shouldn't do stop Kubectl stop and start type of testing. There are known defects in CSI which are not fixed for our MVP. Please read E2E on this for reference --> IBM/ibm-spectrum-scale-csi#563 Will share with you list of defects, which you can go through on this Failover/Failback Failover/Failback scenario has to be done over the node power on/off method only |
I was NOT able to recreate with ipmitool power off. However, the same conditions did not exist but that might not matter. In my test listed above, both noobaa-db-pg-o and the noobaa-default-backing-store-noobaa-pod were hosted by the same node. I don't have that condition any more. |
@MonicaLemay , I don't think the backing store will matter if you are done via ipmi tool. Yes, it does matter if you have done with kubectl command as mentioned the CSI driver volume will come into play for the pvc to be Active. However there is no real use for us w/r/t backingstore as Nimrod did say they are planned not to have that one for future ODF releases as per few months back discussion. Also, if you want to get the pods on the same node, you could try deleting one of them few times and they might get onto the same node. This is what was tried for noobaa core and noobaa-db pod's on the same node for Failover/Failback testing |
If this is not recreatable when we do ipmitool power off then power on. AND is only recreateable with systemctl stop kubectl , then this might not be a sev1. Can someone weigh in on this so that we can better understand our priorities?? |
@MonicaLemay, how are you? Regarding the noobaa-db-pg-0 db container producing According to noobaa-db-pg-0-db.log, noobaa-db-pg-0-db-previous.log the start up script warns about To troubleshoot, could you please try the manual DB volume recovery procedure described here? Could you let me know if you see the Postgres server starting normally, after scaling the DB stateful set replicas back to 1 at the end of that procedure?
|
Hi @MonicaLemay , Please confirm if this is a Non-GA blocker. Thanks |
@akmithal This is not a GA blocker. |
@NeeshaPan , |
we followed below link for getting out of crashloopback state. |
After bringing the noobaa-db pod up using above link, mmdas commands / Rest-api's are not working as expected. we are hitting error "something went wrong" when trying to run any of the mmdas commands. |
@NeeshaPan , when you try next time, update the steps that are relevant for the noobaa pods by trying when the noobaa-db pod running node , the service is made down on Fyre and update if the same behavior is observed. |
I tried the failover failback of noobaa-core and noobaa-db pod on same node and also failover failback of noobaa-db pod only on fyre cluster. However I am not able to reproduce this issue on fyre cluster. |
@baum . |
Will try the scenario on BM once it comes up as it is a compact cluster |
@romayalon I am able to reproduce this issue on BM. It is easily reproducible on BM systems. FYI @rkomandu |
@baum please see last comment |
This was discussed with @baum and the pointer is towards the access to Postgres DB from 2 different nodes. Will need to discuss with CSI team. |
@MonicaLemay Could you please update the summary of defect. just need to replace fall back to failback
FYI @rkomandu |
@MonicaLemay , we just thought that "fail back" is appropriate than "fall back" .. Do change only if you agree. |
@baum, we had a discussion with Deepak (IBM CSI)team, there are few Questions that we need to get clarity on , in order to make progress on this behavior
@nimrod-becker , @baum Note: Earlier discussed with Shane Heroux on the same, posted for reference. Could Alex discuss with Shane and get the ball rolling ?
|
Hello @rkomandu 🖖
Considering the test performed. After the kublet is stopped, the Postgres on that node continues to run, potentially writing into the persistent volume. Then a new Postgres is scheduled on a healthy node, also potentially writing into the same persistent volume. Question: what happens to the persistent volume changes on the node where kubelet was stopped, while kublet is not running? Are those changes "merged" with changes on the healthy node? Or those changes are discarded once the communication with the node is restored? |
@baum , thank you for your explanation. As mentioned by CSI team, the volume is RWO policy, so it can't be done from multiple nodes at a time. Will ask Deepak from CSI team to have a look at your above post and respond. |
Hi @rkomandu, As I mentioned earlier k8s enforces the RWO, it means there is chance in such scenario where orphan pod on node where kubelet is being restarted can access data since kubelet communication was down and cleanup did not happen. I think here we need to understand impact of shutting down/starting kubelet on master and reconciliation process and possibilities of orphan pod causing data corruption. I think @baum is also hinting the same. |
Hi @baum , as per email communication with Shane from RH , Is there any progress made to do further investigate on this behavior ? |
@romayalon / @nimrod-becker |
please look at https://bugzilla.redhat.com/show_bug.cgi?id=2010702 (this is similar behavior) we are discussing here on the noobaa db/ pvc @NeeshaPan @romayalon FYI |
The BZ stated was closed as not a bug (not the tracker but the actual BZ it tracked...) |
Status: CLOSED → NEW |
I just handled a similar case. Did we try to add a proper shutdown to postgres - I tried to add manually the following patch to $ oc patch sts/noobaa-db-pg --patch '
spec:
template:
spec:
terminationGracePeriodSeconds: 90
containers:
- name: db
lifecycle:
preStop:
exec:
command: [ "/usr/bin/pg_ctl", "stop", "-D", "/var/lib/pgsql/data/userdata", "-w", "-t", "60", "-m", "fast" ]
'
statefulset.apps/noobaa-db-pg patched
|
hi @guymguym , this postgres seems to be the problem, if you have come across the above There were few discussions with RH manager(Shane/Shaun, don't recall exactly) and Nimrod on this defect to understand whether we should allow customer to perform "kubectl service stop" or not. We couldn't get to consensus over the email, about the usecase usability. I was pushing this since the DAS solution is Compact Cluster env. After multiple discussions/try out with explaining to Romy/Alex it was mostly the postgres related issue. If customer perform this then the defect has to be fixed IMO. Please advise |
@romayalon @nimrod-becker |
Hi @rkomandu I apologies I don't know the exact status. @dannyzaken - any plans? I do hope the options to the statefulset, like I showed above (preStop hook and termination grace seconds) could be tested, and if working better we can add it to the operator statefulset-postgres-db.yaml. |
This issue had no activity for too long - it will now be labeled stale. Update it to prevent it from getting closed. |
Closing, HPO is discontinued. |
Environment info
INFO[0000] CLI version: 5.9.0
INFO[0000] noobaa-image: noobaa/noobaa-core:nsfs_backport_5.9-20220331
INFO[0000] operator-image: quay.io/rhceph-dev/odf4-mcg-rhel8-operator@sha256:eb56f52778b71a04b7df62db4ea241c65f84e2b80ddcc9b588414d173d7e086c
INFO[0000] noobaa-db-image: quay.io/rhceph-dev/rhel8-postgresql-12@sha256:be7212e938d1ef314a75aca070c28b6433cd0346704d0d3523c8ef403ff0c69e
OCP 4.9.29
ODF 4.9.6-1 w/ patch 3/31
Actual behavior
The node, c83f1-dan3.ocp4.pokprv.stglabs.ibm.com was hosting the pods, noobaa-db-pg-0 and noobaa-default-backing-store-noobaa-pod-6b3cc266
I ssh'ed into node c834f1-dan3 and ran:
All pods failed over to either dan2 or dan1 after about 7 minutes. The pod noobaa-db-pg-0 failed over to dan2 and noobaa-default-backing-store to dan1. They go to running state and s3 and mmdas and I/O continues to run.
The fall back failed for noobaa-db-pg-0.
The noobaa-default-baking-store stays on dan1. The Noobaa-db-pg-0 goes to crashloopbackoff.
Describe of pod shows:
Logs on the failing pod:
It does not recover on its own. The only way to recover is to do delete the s3 service. All accounts and exports are lost unless a backup was done prior to this event
Noobaa diagnose and must-gather are in box note and labeled with this defect number
https://ibm.ent.box.com/folder/145794528783?s=uueh7fp424vxs2bt4ndrnvh7uusgu6tocd
Not sure if this defect that I am reporting is related in any way to.
sclorg/postgresql-container#166
Expected behavior
Steps to reproduce
Listed above
More information - Screenshots / Logs / Other output
The text was updated successfully, but these errors were encountered: