Open invidian opened 4 years ago
Scenario: Running a ceph cluster using the rook operator. During drain, the volumes are detatched, however it might take some time to propagate the the kernel unmount. I have not looked into details, but according to @martin31821 this is caused by the ceph kernel client doing some foo during unmount, thus trying to change this from userspace is not possible. https://github.com/kinvolk/flatcar-linux-update-operator/pull/62 introduces a quick workaround by just adding some wait time after draining the node.
Maybe we can solve this by introducing a possibility to run one or more kubernetes jobs prior to rebooting, which could be used e.g. to change DNS records, wait a certain amount of time or run host commands prior to rebooting.
Not ideal, but I guess we could test against that on Lokomotive, as we have there a pipeline testing FLUO and Rook together. CC @surajssd
Note: existing capabilities for running hooks runs before node is drained, which indeed can make it impossible right now to deploy a custom hook which could ensure it. Perhaps this could be addressed.
As part of #37, I'm analyzing how FLUO works in details, as there is no documentation or tests and what comes to my mind is, that perhaps hooks model could be extended, so it's possible to run a workflow between each significant action taken, which would be:
However, existing state tracking model is overly complex and right now I don't feel comfortable adding another step to it. Perhaps we try to simplify it first, then extend with extra hook.
We are affected by this is well. Some seconds of sleep after draining, like in https://github.com/flatcar-linux/flatcar-linux-update-operator/pull/62 would help mitigating.
Just realized I think I hit this issue on my cluster as well :smile:
Created PoC/draft PR to play around with this and things seem to improve nicely: https://github.com/flatcar-linux/flatcar-linux-update-operator/pull/169.
Original issue: https://github.com/coreos/container-linux-update-operator/issues/191
Perhaps waiting for
kubectl get volumeattachments
to get empty with the right selector would be sufficient?