Repository navigation
Commit 91f2c59
committed
kvm: fix SharedMountPoint heartbeat when pool path is a subdirectory of a mount
kvmsmpheartbeat.sh required the pool path itself to be a mount point
(mountpoint -q). A SharedMountPoint pool is "a file system path local to
each server" and is commonly a subdirectory of a mounted clustered or
parallel filesystem (e.g. /data01/vol01 on IBM Storage Scale mounted at
/data01). For such pools every heartbeat write failed.
- add is_on_mounted_fs(): the path must reside on a mounted filesystem
other than / (findmnt -T, fallback df -P). Use it for both the initial
check and the /proc/mounts check in front of deleteVMs, so relaxing the
first check cannot lead to deleteVMs (kill -9) being run on every write.
- check_hbLog: 'expr' exits with 1 when the result is 0, so a heartbeat
read in the same second it was written reported the host as DEAD.
Validate the timestamp and use shell arithmetic instead.
- remove the temporary heartbeat file when the script is interrupted
(e.g. killed on timeout).
Fixes #143261 parent 2974af8 commit 91f2c59
1 file changed
Lines changed: 29 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
88 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
89 | 100 | | |
90 | 101 | | |
91 | 102 | | |
| |||
112 | 123 | | |
113 | 124 | | |
114 | 125 | | |
115 | | - | |
116 | | - | |
| 126 | + | |
| 127 | + | |
117 | 128 | | |
118 | 129 | | |
119 | 130 | | |
| |||
146 | 157 | | |
147 | 158 | | |
148 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
149 | 163 | | |
150 | 164 | | |
151 | 165 | | |
| |||
168 | 182 | | |
169 | 183 | | |
170 | 184 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
177 | 193 | | |
178 | 194 | | |
179 | 195 | | |
| |||
0 commit comments