Skip to content

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

@Syspretor

Description

@Syspretor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions