Hi all,
I've been observing this problem for a long time now and it's time to finally figure out what's going on.
We're running gluster 5.11 and have a 10TB 1 x 4 = 4 replicate volume. I'll include its slightly redacted config below.
When I reboot one of the servers and it goes offline for a bit, when it comes back, heal info tells me there are some files and dirs that are "heal pending". 0 "split-brain" and "possibly healing" - only "heal pending" are >0.
- For some reason, the server that was rebooted shows "heal pending" 0. All other servers show "heal pending" with some number, say 65.
- We have cluster.self-heal-daemon enabled.
- The logs are full of "performing entry selfheal" and "completed entry selfheal" messages that continue to print endlessly.
- This "heal pending" number never goes down by itself, but it does if I run some operation on it, like md5sum.
- When the server goes down for reboot and especially when it comes back, the load on ALL servers shoots up through the roof (load of 100+) and ends up bringing everything down, including apache and nginx. My theory is that self-heal kicks in so hard that it kills IO on these attached Linode block devices. However, after some time - say 10 minutes - the load subsides, but the "heal pending" remains and the gluster logs continue to output "performing entry selfheal" and "completed entry selfheal" messages. This load spike has become a huge issue for us because it brings down the whole site for entire minutes.
- At this point in my investigation, I noticed that the selfheal messages actually repeat for the same gfids over and over.
[2020-04-26 21:32:29.877987] I [MSGID: 108026] [afr-self-heal-entry.c:897:afr_selfheal_entry_do] 0-SNIP_data1-replicate-0: performing entry selfheal on 96d282cf-402f-455c-9add-5f03c088a1bc
[2020-04-26 21:32:29.901246] I [MSGID: 108026] [afr-self-heal-common.c:1729:afr_log_selfheal] 0-SNIP_data1-replicate-0: Completed entry selfheal on 96d282cf-402f-455c-9add-5f03c088a1bc. sources= sinks=0 1 2
[2020-04-26 21:32:32.171959] I [MSGID: 108026] [afr-self-heal-entry.c:897:afr_selfheal_entry_do] 0-SNIP_data1-replicate-0: performing entry selfheal on 96d282cf-402f-455c-9add-5f03c088a1bc
[2020-04-26 21:32:32.225828] I [MSGID: 108026] [afr-self-heal-common.c:1729:afr_log_selfheal] 0-SNIP_data1-replicate-0: Completed entry selfheal on 96d282cf-402f-455c-9add-5f03c088a1bc. sources= sinks=0 1 2
[2020-04-26 21:32:33.346990] I [MSGID: 108026] [afr-self-heal-entry.c:897:afr_selfheal_entry_do] 0-SNIP_data1-replicate-0: performing entry selfheal on 96d282cf-402f-455c-9add-5f03c088a1bc
[2020-04-26 21:32:33.374413] I [MSGID: 108026] [afr-self-heal-common.c:1729:afr_log_selfheal] 0-SNIP_data1-replicate-0: Completed entry selfheal on 96d282cf-402f-455c-9add-5f03c088a1bc. sources= sinks=0 1 2 - I used gfid-resolver.sh from https://gist.github.com/4392640.git to resolve this gfid to the real location and yup - it was one of the files (a dir actually) listed as "heal pending" in heal info. As soon as I ran md5sum on the file inside (which was also listed in "heal pending"), the log messages stopped repeating for this entry and it disappeared from "heal pending" heal info. These were the final log lines:
[2020-04-26 21:32:35.642662] I [MSGID: 108026] [afr-self-heal-metadata.c:52:__afr_selfheal_metadata_do] 0-SNIP_data1-replicate-0: performing metadata selfheal on 96d282cf-402f-455c-9add-5f03c088a1bc
[2020-04-26 21:32:35.658714] I [MSGID: 108026] [afr-self-heal-common.c:1729:afr_log_selfheal] 0-SNIP_data1-replicate-0: Completed metadata selfheal on 96d282cf-402f-455c-9add-5f03c088a1bc. sources=0 [1] 2 sinks=3
[2020-04-26 21:32:35.686509] I [MSGID: 108026] [afr-self-heal-entry.c:897:afr_selfheal_entry_do] 0-SNIP_data1-replicate-0: performing entry selfheal on 96d282cf-402f-455c-9add-5f03c088a1bc
[2020-04-26 21:32:35.720387] I [MSGID: 108026] [afr-self-heal-common.c:1729:afr_log_selfheal] 0-SNIP_data1-replicate-0: Completed entry selfheal on 96d282cf-402f-455c-9add-5f03c088a1bc. sources=0 [1] 2 sinks=3
I have to repeat this song and dance every time I reboot servers and run md5sum on each "heal pending" file or else the messages will continue presumably indefinitely. In the meantime, the files seem to be fine when accessed.
What I don't understand is:
- Why doesn't gluster just heal them properly instead of getting stuck? Or maybe this was fixed in v6 or v7, which I haven't upgraded to due to waiting for another unrelated issue to be fixed?
- Why does heal info show 0 "heal pending" files on the server that was rebooted, but all other servers show the same number of "heal pending" entries >0?
- Why are there these insane load spikes upon going down and especially coming back online? Is it related to the issue here? I'm pretty sure that it didn't happen in previous versions of gluster, when this issue didn't manifest - I could easily bring down one of the servers without it creating havoc when it comes back online.
Here's the volume info:
Volume Name: SNIP_data1Type: ReplicateVolume ID: 11ecee7e-d4f8-497a-9994-ceb144d6841eStatus: StartedSnapshot Count: 0Number of Bricks: 1 x 4 = 4Transport-type: tcpBricks:Brick1: SNIP:/mnt/SNIP_block1/SNIP_data1Brick2: SNIP:/mnt/SNIP_block1/SNIP_data1Brick3: SNIP:/mnt/SNIP_block1/SNIP_data1Brick4: SNIP:/mnt/SNIP_block1/SNIP_data1Options Reconfigured:performance.client-io-threads: onnfs.disable: ontransport.address-family: inetcluster.self-heal-daemon: enableperformance.cache-size: 1GBcluster.lookup-optimize: onperformance.read-ahead: offclient.event-threads: 4server.event-threads: 4performance.io-thread-count: 32cluster.readdir-optimize: onfeatures.cache-invalidation: onfeatures.cache-invalidation-timeout: 600performance.stat-prefetch: onperformance.cache-invalidation: onperformance.md-cache-timeout: 600network.inode-lru-limit: 500000performance.parallel-readdir: onperformance.readdir-ahead: onperformance.rda-cache-limit: 256MBnetwork.remote-dio: enablenetwork.ping-timeout: 5cluster.quorum-type: fixedcluster.quorum-count: 1cluster.granular-entry-heal: enablecluster.data-self-heal-algorithm: full
Appreciate any insight. Thank you.
________ Community Meeting Calendar: Schedule - Every 2nd and 4th Tuesday at 14:30 IST / 09:00 UTC Bridge: https://bluejeans.com/441850968 Gluster-users mailing list Gluster-users@xxxxxxxxxxx https://lists.gluster.org/mailman/listinfo/gluster-users