<div dir="ltr"><div><div><div><div>Hi all,<br><br></div>By attaching a debugger to the live glusterfsd process, I think I at least figured out why the files only appear when the stat or du is done as root. Curro Rodriguez, do you run the stats as root? As I mentioned that was necessary for the heal to kick in.<br><br></div>It seems to be because of the function acl_permits in xlators/system/posix-acl/src/posix-acl.c. The goal of this function is, I think, to decide whether the glusterfsd will allow a certain operation to take place. In this case, I try to list a directory that doesn't exist on the new brick. This causes a "mkdir" heal operation to happen on the local brick. "acl_permits" decides whether that mkdir is allowed to take place, and because I'm not an owner, I'm not. However, if I ran the initial "ls" as root, frame_is_super_user(frame) would be true, so it allows anything to take place, even the mkdir.<br><br></div>IMO, acl_permits should always permit healing operations, even if the user that originally requested the operation that caused the heal would not be allowed to run the healing operation necessary.<br><br></div>Sjors<br></div><br><div class="gmail_quote"><div dir="ltr">Op vr 3 jul. 2015 om 13:04 schreef M S Vishwanath Bhat <<a href="mailto:msvbhat@gmail.com">msvbhat@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 3 July 2015 at 15:02, Sjors Gielen <span dir="ltr"><<a href="mailto:sjors@sjorsgielen.nl" target="_blank">sjors@sjorsgielen.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Vishwanath,<br><br><div><div class="gmail_quote"><div dir="ltr">Op do 2 jul. 2015 om 21:51 schreef M S Vishwanath Bhat <<a href="mailto:msvbhat@gmail.com" target="_blank">msvbhat@gmail.com</a>>:<br></div><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>AFAIK there are two ways you can trigger the self-heal<br><br></div><div>1. Use the gluster CLI "heal" command. I'm not sure why it didn't work for you and needs to be investigated.<br></div></div></div></div></blockquote><div><br></div></span><div>Do you think I should file a bug for this? I can reliably reproduce using the steps in my original e-mail. (This is Gluster 3.7.2, by the way.)<br></div></div></div></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Yes, you should file a bug if it's not working.<br><br></div><div>Meanwhile Pranith or Xavi (self-heal developers) might be able to help you.<br><br></div><div>Best Regards,<br></div><div>Vishwanath<br><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="gmail_quote"><div></div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div>2. Running 'stat' on files on gluster volume mountpoint, So if you run stat on the entire mountpoint, the files should be properly synced across all the replica bricks.<br></div></div></div></div></blockquote><div><br></div></span><div>This indeed seems to do the same as the `du`: when run as root on the server running the complete brick, the file appears on the incomplete brick as well. Initially as an empty file, but after a few seconds the complete file exists. When the `stat` is not ran as root, this doesn't happen, which I still think is bizarre.<br><br></div><div>Thanks,<br></div><div>Sjors<br></div></div></div></div>
</blockquote></div></div></div></blockquote></div>