fluid icon indicating copy to clipboard operation
fluid copied to clipboard

[BUG] A probabilistic failure of check-mount script redirection in PreStartHook occurs due to slow startup of the Fuse container.

Open Syspretor opened this issue 1 year ago • 0 comments

The following postStartHook will be injected in the fuse-sidecar to check the mount status.

lifecycle:
  postStart:
    exec:
      command: [ "/bin/sh", "-c", "time /check-mount.sh >> /proc/1/fd/1" ]

However, the startup of the Container and the execution of the PostStartHook occur in parallel. it is possible that when the PostStartHook is executed, the PID 1 process inside the container has not completed its startup. This can lead to a failure in redirecting to /proc/1/fd/1 when the PostStartHook runs the check-mount script.

The relevant error log in Kubelet (1.31) is as follows:

PostStartHookError: Exec lifecycle hook ([bash -c time /check-mount.sh >> /proc/1/fd/1]) for Container "fluid-fuse-0" in Pod "" failed - error: command 'bash -c time /check-mount.sh >> /proc/1/fd/1' exited with 1: bash: /proc/1/fd/1: Permission denied

Syspretor avatar Dec 23 '24 11:12 Syspretor