Commit c7db83b
committed
fs: avoid hanging os.Stat() in NodeGetVolumeStats after restart
If a node-plugin pod restarts while the backend (e.g. MDS) is down,
NodeGetVolumeStats used to call os.Stat() on the target path
immediately after (re)starting the health checker, before the
checker had a chance to detect the outage. Since os.Stat() blocks
in the kernel on an unresponsive mount, this held the VolumeLock
forever and made every later call for that path fail with Aborted.
Return early with an "not yet available" condition instead of
calling os.Stat() when the checker was just (re)started, for
CephFS.
Signed-off-by: SanjalKatiyar <sanjaldhir@gmail.com>1 parent b22ca60 commit c7db83b
1 file changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
953 | 963 | | |
954 | 964 | | |
955 | 965 | | |
956 | 966 | | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
957 | 974 | | |
958 | 975 | | |
959 | 976 | | |
| |||
966 | 983 | | |
967 | 984 | | |
968 | 985 | | |
969 | | - | |
| 986 | + | |
970 | 987 | | |
971 | 988 | | |
972 | 989 | | |
| |||
0 commit comments