K 10 svn:author V 3 avg K 8 svn:date V 27 2017-04-14T18:19:48.863264Z K 7 svn:log V 1490 4242 file rename event fires before the rename happens illumos/illumos-gate@54207fd2e1e7ed01d0416da8cf296dbef920fbfc https://github.com/illumos/illumos-gate/commit/54207fd2e1e7ed01d0416da8cf296dbef920fbfc https://www.illumos.org/issues/4242 From Joyent's OS-2557: So we're basically just doing a check here that after we got a 'rename' event for our file, the file has actually been moved out of the way. What I've seen in bh1-stage2 is that this happens as you'd expect for all zones but many times over the last week it's failed because when we do the fs.exists () check here, the file that we got the rename event for, still exists. I've confirmed what's happening using the following dtrace script: #!/usr/sbin/dtrace -s #pragma D option quiet #pragma D option bufsize=256k syscall::open:entry, syscall::open64:entry /copyinstr(arg0) == "/var/svc/provisioning" || (strlen(copyinstr(arg0)) == 69 && substr(copyinstr(arg0), 48) == "/var/svc/provisioning")/ { this->watching_open = 1; printf("%d zone %s process %s(%d) [%s] open(%s)\\n", timestamp, zonename, execname, pid, curpsinfo->pr_psargs, copyinstr(arg0)); } syscall::open:return, syscall::open64:return /this->watching_open == 1/ Reviewed by: Robert Mustacchi Reviewed by: Marcel Telka Approved by: Dan McDonald Author: Jerry Jelinek END