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

diagnostic reorg and NetworkCheck fix #18709

Merged

Conversation

sosiouxme
Copy link
Member

@sosiouxme sosiouxme commented Feb 22, 2018

The leading commits of this PR change nothing visible to the user. Internally, they remove a direct dependency on docker and reorganize the two diagnostics that currently run diagnostics in a pod, PodDiagnostic and NetworkCheck. The reorg brings files for each under one directory so it's easier to find and understand them.

The final two commits address #16596 by making NetworkCheck a cluster diagnostic and constructing the pod kubeconfig from the (now guaranteed to be an admin) config.

Commits can be squashed or split out into separate PRs if preferable. I would expect it to be rather confusing to review as a whole, especially since a lot of the changes are just stuff moving around; easier to to grasp one commit at a time.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 22, 2018
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 22, 2018
@sosiouxme sosiouxme force-pushed the 20180221-diagnostic-reorg branch from 9ccc2ec to 4c41254 Compare February 23, 2018 04:07
@sosiouxme sosiouxme changed the title diagnostic reorg diagnostic reorg and NetworkCheck fix Feb 23, 2018
@sosiouxme sosiouxme force-pushed the 20180221-diagnostic-reorg branch from 4c41254 to bae0c9f Compare February 23, 2018 04:22
Use convenience function that could be refactored to be based on
something else, rather than directly depending on docker.
Formerly, in order to run diagnostics inside a pod, NetworkCheck looked
up the user's kubeconfig file and wrote it to a secret for the pod
to use as its kubeconfig. However, this only worked if the current
context is the cluster-admin.

Cluster diagnostics can work even if the cluster-admin context is not
currently selected. For NetworkCheck to work the same it is now a
cluster diagnostic, and it writes a new pod kubeconfig with only the
cluster-admin context.
@sosiouxme sosiouxme force-pushed the 20180221-diagnostic-reorg branch from bae0c9f to 4213489 Compare February 23, 2018 04:22
nd.Level = o.LogOptions.Level
nd.Factory = o.Factory
nd.PreventModification = o.PreventModification
diagnostics = append(diagnostics, nd)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could cause empty d to be added to diagnostics in this iteration.

nd.PreventModification = o.PreventModification
diagnostics = append(diagnostics, nd)
d = nd

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, issue in previous commit got fixed here

@pravisankar
Copy link

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 6, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pravisankar, sosiouxme

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

@pravisankar
Copy link

/retest

@sosiouxme
Copy link
Member Author

/cherrypick release-3.9

@openshift-cherrypick-robot

@sosiouxme: once the present PR merges, I will cherry-pick it on top of release-3.9 in a new PR and assign it to you.

In response to this:

/cherrypick release-3.9

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.

@eparis eparis added this to the v3.9 milestone Mar 7, 2018
@brenton brenton removed this from the v3.9 milestone Mar 7, 2018
@sosiouxme
Copy link
Member Author

/hold
just because there's too much in the queue today and this can wait

@openshift-ci-robot openshift-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Mar 7, 2018
@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 18778, 18709, 18876, 18897, 18652).

@openshift-cherrypick-robot

@sosiouxme: new pull request created: #18903

In response to this:

/cherrypick release-3.9

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.

@sosiouxme sosiouxme deleted the 20180221-diagnostic-reorg branch March 16, 2018 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/diagnostics lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants