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

[release 4.7] Bug 1913356: Implemented gathering specific logs from openshift apiserver operator #273

Conversation

Serhii1011010
Copy link
Contributor

@Serhii1011010 Serhii1011010 commented Nov 28, 2020

Categories

  • Bugfix
  • Enhancement
  • Backporting
  • Others (CI, Infrastructure, Documentation)

Sample archive

  • config/pod/{namespace-name}/logs/{pod-name}/errors.log

Documentation

  • docs/gathered-data.md

Unit Tests

  • pkg/gather/clusterconfig/openshift_apiserver_operator_logs_test.go

Privacy

Yes. There are no sensitive data in the newly collected information.

References

https://issues.redhat.com/browse/CCXDEV-3519
https://bugzilla.redhat.com/show_bug.cgi?id=1913356
https://access.redhat.com/solutions/5448851

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2020
@openshift-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2020
Copy link
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

LGTM

@droslean
Copy link
Member

droslean commented Dec 1, 2020

/test all

var records []record.Record

for _, pod := range pods.Items {
request := coreClient.Pods(namespace).GetLogs(pod.Name, &corev1.PodLogOptions{
Copy link
Contributor

@tremes tremes Dec 2, 2020

Choose a reason for hiding this comment

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

This relies on the fact that there's only one pod in the openshift-apiserver-operator namespace right? It's probably minor but I would suggest to narrow down the filtering to one given pod, because there can be more pods in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it actually collects logs from all the pods from the given namespace

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes but I think we are interested only in "openshift-apiserver-operator" pod log right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually the pod's name is something like "openshift-apiserver-operator-6ddb679b87-4kn55" so we can only find all or some pods from namespace "openshift-apiserver-operator", I don't think there will be other unrelatable pods in this namespace

@Serhii1011010 Serhii1011010 changed the title [WIP] implemented gathering specific logs from openshift apiserver operator Implemented gathering specific logs from openshift apiserver operator Dec 2, 2020
@Serhii1011010 Serhii1011010 marked this pull request as ready for review December 2, 2020 14:28
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 2, 2020
@Serhii1011010
Copy link
Contributor Author

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 2, 2020
go.mod Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
@Serhii1011010 Serhii1011010 force-pushed the gather-logs-from-openshift-apiserver-operator branch from 6d2d825 to c80f47e Compare December 7, 2020 17:30
@openshift-merge-robot
Copy link
Contributor

openshift-merge-robot commented Dec 7, 2020

@Sergey1011010: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/unit d8bb31e link /test unit
ci/prow/insights-operator-e2e-tests d8bb31e link /test insights-operator-e2e-tests
ci/prow/e2e d8bb31e link /test e2e

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@tremes
Copy link
Contributor

tremes commented Dec 17, 2020

@Sergey1011010 Please rebase

@Serhii1011010
Copy link
Contributor Author

/retest

}},
metav1.CreateOptions{},
)
helpers.FailOnError(t, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

I am asking myself. Is it worth of adding this new dependency because of using one function in the tests?

Copy link
Contributor

Choose a reason for hiding this comment

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

and I tend to say: No it's not :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, there are some other functions https://github.com/RedHatInsights/insights-operator-utils/tree/master/tests/helpers which we may need in the future, but I can remove it, no problems

Copy link
Contributor

Choose a reason for hiding this comment

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

When looking at the change in go.sum (toooo many new stuff) then I would remove it. I would keep the unit tests as simple as possible (we can improve the integration tests once we have the independent CI image). Thanks and sorry.

@Serhii1011010 Serhii1011010 force-pushed the gather-logs-from-openshift-apiserver-operator branch from 48bc50c to 1186414 Compare January 6, 2021 15:16
@Serhii1011010 Serhii1011010 changed the title Implemented gathering specific logs from openshift apiserver operator [release 4.7] Bug 1913356: Implemented gathering specific logs from openshift apiserver operator Jan 6, 2021
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. label Jan 6, 2021
@openshift-ci-robot
Copy link
Contributor

@Sergey1011010: This pull request references Bugzilla bug 1913356, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

[release 4.7] Bug 1913356: Implemented gathering specific logs from openshift apiserver operator

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Jan 6, 2021
@Serhii1011010
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@Sergey1011010: This pull request references Bugzilla bug 1913356, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jan 6, 2021
@Serhii1011010
Copy link
Contributor Author

/retest

1 similar comment
@Serhii1011010
Copy link
Contributor Author

/retest

@Serhii1011010
Copy link
Contributor Author

/unhold

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 7, 2021
@0sewa0
Copy link
Contributor

0sewa0 commented Jan 7, 2021

/lgtm

tested it on clusterbot cluster, the logs weren't collected when the specified error wasn't present, and they were collected when the error was present

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 7, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 0sewa0, Sergey1011010, tisnik

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:
  • OWNERS [0sewa0,Sergey1011010,tisnik]

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

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 710c942 into openshift:master Jan 7, 2021
@openshift-ci-robot
Copy link
Contributor

@Sergey1011010: All pull requests linked via external trackers have merged:

Bugzilla bug 1913356 has been moved to the MODIFIED state.

In response to this:

[release 4.7] Bug 1913356: Implemented gathering specific logs from openshift apiserver operator

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.

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. bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants