Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix symlink broken in container log filepath #1042

Merged
merged 5 commits into from
Aug 7, 2023

Conversation

henryzhx8
Copy link
Collaborator

@henryzhx8 henryzhx8 commented Aug 3, 2023

解决方案

当容器标准输出的文件路径不存在时,顺着文件路径逐级查看当前目录是否包含软链接,并进行相应的修正。

测试用例

  1. 路径中不存在软连接,但中间某个目录不存在
  2. 路径中不存在软连接,但文件不存在
  3. 路径中存在指向目录的软链接,且指向的目录存在
  4. 路径中存在指向目录的软链接,但指向的目录不存在
  5. 文件为软链接,且指向的文件存在
  6. 文件为软链接,但指向的文件不存在
  7. 路径中存在指向软链接的软链接,且指向的软链接所指向的内容存在
  8. 路径中存在指向软链接的软链接,但指向的软链接所指向的内容不存在

@henryzhx8 henryzhx8 added the bug Something isn't working label Aug 3, 2023
@henryzhx8 henryzhx8 linked an issue Aug 3, 2023 that may be closed by this pull request
@yyuuttaaoo yyuuttaaoo linked an issue Aug 3, 2023 that may be closed by this pull request
plugins/input/docker/stdout/input_docker_stdout.go Outdated Show resolved Hide resolved
pkg/helper/mount_windows.go Outdated Show resolved Hide resolved
plugins/input/docker/stdout/input_docker_stdout.go Outdated Show resolved Hide resolved
pkg/helper/mount_others.go Outdated Show resolved Hide resolved
@yyuuttaaoo yyuuttaaoo merged commit 42ad9d5 into alibaba:main Aug 7, 2023
19 checks passed
@linrunqi08 linrunqi08 added this to the v1.7 milestone Aug 8, 2023
@henryzhx8 henryzhx8 deleted the fix/stdout_link branch August 9, 2023 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: 希望支持 containerd 标准输出 [BUG]: containerd pod stdout file not found
4 participants