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

Install and start logging agent based on kube env #81300

Merged
merged 4 commits into from Sep 5, 2019

Conversation

@liyanhui1228
Copy link
Contributor

commented Aug 12, 2019

What type of PR is this?

/kind bug

Which issue(s) this PR fixes:

Fixes #81299

Install and start logging agent based on kube env ENABLE_NODE_LOGGING.
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Aug 12, 2019

Hi @liyanhui1228. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@liyanhui1228

This comment has been minimized.

Copy link
Contributor Author

commented Aug 12, 2019

/assign @yujuhong

@liyanhui1228

This comment has been minimized.

Copy link
Contributor Author

commented Aug 12, 2019

/sig windows

@neolit123

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

/ok-to-test
/priority backlog

@@ -109,10 +123,13 @@ try {
StartProcess-WriteSshKeys
}

if (IsLoggingEnabled $kube_env) {
InstallAndStart-LoggingAgent

This comment has been minimized.

Copy link
@yujuhong

yujuhong Aug 13, 2019

Member

@pjh if stackdriver is already installed on the image, would it be started automatically?

This comment has been minimized.

Copy link
@pjh

pjh Aug 13, 2019

Contributor

Yes. https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/windows/k8s-node-setup.psm1#L1178

@liyanhui1228 could you update the comment above that function to state that even if Stackdriver is already installed, the function will still [re]start the service?

This comment has been minimized.

Copy link
@liyanhui1228

liyanhui1228 Sep 3, 2019

Author Contributor

Done.

[parameter(Mandatory=$true)] [hashtable]$KubeEnv
)

if ($KubeEnv.Contains('ENABLE_NODE_LOGGING') -and `

This comment has been minimized.

Copy link
@yujuhong

yujuhong Aug 13, 2019

Member

Is this enabled by default?

This comment has been minimized.

Copy link
@liyanhui1228

liyanhui1228 Aug 13, 2019

Author Contributor

Yes it is.

@pjh
pjh approved these changes Aug 13, 2019

if ($KubeEnv.Contains('ENABLE_NODE_LOGGING') -and `
($KubeEnv['ENABLE_NODE_LOGGING'] -eq 'true')) {
return $true

This comment has been minimized.

Copy link
@pjh

pjh Aug 13, 2019

Contributor

I see that this currently looks like https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/windows/common.psm1#L532, but can this just be?:

  return ($KubeEnv.Contains('ENABLE_NODE_LOGGING') -and `
      ($KubeEnv['ENABLE_NODE_LOGGING'] -eq 'true'))

Mostly just curious, if you don't want to bother trying it that's fine.

@@ -109,10 +123,13 @@ try {
StartProcess-WriteSshKeys
}

if (IsLoggingEnabled $kube_env) {
InstallAndStart-LoggingAgent

This comment has been minimized.

Copy link
@pjh

pjh Aug 13, 2019

Contributor

Yes. https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/windows/k8s-node-setup.psm1#L1178

@liyanhui1228 could you update the comment above that function to state that even if Stackdriver is already installed, the function will still [re]start the service?


if ($KubeEnv.Contains('ENABLE_NODE_LOGGING') -and `
($KubeEnv['ENABLE_NODE_LOGGING'] -eq 'true')) {
return $true

This comment has been minimized.

Copy link
@pjh

pjh Aug 13, 2019

Contributor

Could this just be?:

  return ($KubeEnv.Contains('ENABLE_NODE_LOGGING') -and `
     ($KubeEnv['ENABLE_NODE_LOGGING'] -eq 'true'))

I see this is imitating code that we already have; I'm mostly just curious, if you don't want to bother trying this that's fine.

This comment has been minimized.

Copy link
@liyanhui1228

liyanhui1228 Sep 3, 2019

Author Contributor

Yeah this is imitating the existing code and thanks for the suggestion! I've added a new kube_env ENABLE_STACKDRIVER_WINDOWS as the ENABLE_NODE_LOGGING will be deprecated soon. And I just kept them in the if-elseif.

@yujuhong

This comment has been minimized.

Copy link
Member

commented Sep 4, 2019

The change itself looks good to me, but seems like you need to clean up your commits :-)

@liyanhui1228

This comment has been minimized.

Copy link
Contributor Author

commented Sep 4, 2019

Done, I just rebased the branch.

@liyanhui1228

This comment has been minimized.

Copy link
Contributor Author

commented Sep 4, 2019

/retest

@yujuhong

This comment has been minimized.

Copy link
Member

commented Sep 4, 2019

/retest
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label Sep 4, 2019
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liyanhui1228, yujuhong

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

@liyanhui1228

This comment has been minimized.

Copy link
Contributor Author

commented Sep 5, 2019

/retest

@fejta-bot

This comment has been minimized.

Copy link

commented Sep 5, 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.

5 similar comments
@fejta-bot

This comment has been minimized.

Copy link

commented Sep 5, 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.

@fejta-bot

This comment has been minimized.

Copy link

commented Sep 5, 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.

@fejta-bot

This comment has been minimized.

Copy link

commented Sep 5, 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.

@fejta-bot

This comment has been minimized.

Copy link

commented Sep 5, 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.

@fejta-bot

This comment has been minimized.

Copy link

commented Sep 5, 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.

@yujuhong

This comment has been minimized.

Copy link
Member

commented Sep 5, 2019

This is a bug fix for GCE/Windows only, and should not affect other environments.

@yujuhong yujuhong added this to the v1.16 milestone Sep 5, 2019
@k8s-ci-robot k8s-ci-robot merged commit 9614a85 into kubernetes:master Sep 5, 2019
24 checks passed
24 checks passed
cla/linuxfoundation liyanhui1228 authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-conformance-kind-ipv6 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
@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.