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 windows kubectl log -f. #81747

Merged
merged 1 commit into from Aug 23, 2019

Conversation

@Random-Liu
Copy link
Member

commented Aug 21, 2019

Fixes #81735.

fsnotify doesn't have consistent behavior for symlinks. We explicitly follow the symlink to avoid the inconsistency between platforms.

I've verified this fix in my cluster, and it fixed the issue.

Fix `kubectl logs -f` for windows server containers.
// path is owned by kubelet and the container runtime.
path, err := filepath.EvalSymlinks(path)
if err != nil {
return fmt.Errorf("failed to try resolving symlinks in path %q: %v", path, err)

This comment has been minimized.

Copy link
@dashpole

dashpole Aug 21, 2019

Contributor

Since you are re-using the path variable, won't path always be empty string when err != nil?

This comment has been minimized.

Copy link
@Random-Liu

Random-Liu Aug 21, 2019

Author Member

True. Will update.

This comment has been minimized.

Copy link
@Random-Liu

Random-Liu Aug 21, 2019

Author Member

Done

@Random-Liu Random-Liu force-pushed the Random-Liu:fix-windows-log-follow branch from 98d0511 to 7767ff3 Aug 21, 2019
@dashpole

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

/lgtm

@yujuhong

This comment has been minimized.

Copy link
Member

commented Aug 21, 2019

Thanks! Add a release note so we can cherry-pick?

@kubernetes/sig-windows-bugs

@Random-Liu

This comment has been minimized.

Copy link
Member Author

commented Aug 21, 2019

@yujuhong DOne

@yujuhong

This comment has been minimized.

Copy link
Member

commented Aug 22, 2019

/lgtm

Copy link
Contributor

left a comment

/approve
/lgtm

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: michmike, Random-Liu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

left a comment

/lgtm

@fejta-bot

This comment has been minimized.

Copy link

commented Aug 23, 2019

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 0e1bad3 into kubernetes:master Aug 23, 2019
23 checks passed
23 checks passed
cla/linuxfoundation Random-Liu authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
@Random-Liu Random-Liu deleted the Random-Liu:fix-windows-log-follow branch Aug 23, 2019
k8s-ci-robot added a commit that referenced this pull request Aug 28, 2019
…1747-upstream-release-1.15

Automated cherry pick of #81747: Fix windows kubectl log -f.
k8s-ci-robot added a commit that referenced this pull request Aug 28, 2019
…1747-upstream-release-1.14

Automated cherry pick of #81747: Fix windows kubectl log -f.
@PatrickLang PatrickLang added this to Done (v1.16) in SIG-Windows Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.