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

Bug 1841057: Skip the initial upload delay #117

Merged

Conversation

martinkunc
Copy link
Contributor

If the operator is started for the first time, or if it is not degraded, it will upload the collected data immediately after they are collected.

This is removing the original initial jitter delay between periods. Consequent runs will still be jittered. The 15 seconds detection of data to send is still there even for initial run, so the data should arrive in 15 seconds after they are collected (few seconds).

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label May 28, 2020
@openshift-ci-robot
Copy link
Contributor

@martinkunc: This pull request references Bugzilla bug 1841057, 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.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1841057: Skip the initial upload delay

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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label May 28, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 28, 2020
@martinkunc
Copy link
Contributor Author

@iNecas Would you please have some time to look at this PR ? Thank you..

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.

It looks ok, thank you!

@tisnik
Copy link
Contributor

tisnik commented Jun 1, 2020

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: martinkunc, 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:

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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 1, 2020
@openshift-merge-robot openshift-merge-robot merged commit fba55fc into openshift:master Jun 1, 2020
@openshift-ci-robot
Copy link
Contributor

@martinkunc: All pull requests linked via external trackers have merged: openshift/insights-operator#117. Bugzilla bug 1841057 has been moved to the MODIFIED state.

In response to this:

Bug 1841057: Skip the initial upload delay

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.

@martinkunc
Copy link
Contributor Author

/cherrypick release-4.4

@openshift-cherrypick-robot

@martinkunc: new pull request created: #118

In response to this:

/cherrypick release-4.4

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.

@martinkunc
Copy link
Contributor Author

/cherrypick release-4.3

@openshift-cherrypick-robot

@martinkunc: new pull request created: #120

In response to this:

/cherrypick release-4.3

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-cherrypick-robot

@martinkunc: new pull request created: #121

In response to this:

/cherrypick release-4.2

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.

@smarterclayton
Copy link
Contributor

The reason we did this was so that if the operator went into a crashloop it would not overwhelm the upstream server. How will you mitigate that now after this change went in?

@martinkunc
Copy link
Contributor Author

martinkunc commented Jun 23, 2020

The reason we did this was so that if the operator went into a crashloop it would not overwhelm the upstream server. How will you mitigate that now after this change went in?

@smarterclayton I was hoping that skipping fast upload on Operator's degrated status would be enough. Are you suggesting that I should add detection for POD status as well ? I was thinking about something like this:

pod, _  := gatherKubeClient.CoreV1().Pods(os.Getenv("POD_NAMESPACE")).Get(os.Getenv("POD_NAME"))
allHealthy := true
for _, c := range pod.Status.ContainerStatuses {
	allHealthy = allHealthy && c.RestartCount == 0
}
if allHealthy // fast upload

Do you think it would be better ?

Also I found that I should turn off the consequent fast upload after first successfull upload, rather that based only on non initial call of updateStatus, because Gathering might not be finished for larger clusters at time when updateStatus is called next time.

@martinkunc
Copy link
Contributor Author

@smarterclayton I realized that Restarts can be something good as well. Would there be a better way, maybe checking LastTerminationState?=State.ExitCode != 0
Would it be good enough ?

@martinkunc
Copy link
Contributor Author

Trying to address the better status check in #132

@martinkunc
Copy link
Contributor Author

/cherrypick release-4.4

@openshift-cherrypick-robot

@martinkunc: failed to push cherry-picked changes in GitHub: pushing failed, output: "To https://github.com/openshift-cherrypick-robot/insights-operator\n ! [rejected] cherry-pick-117-to-release-4.4 -> cherry-pick-117-to-release-4.4 (non-fast-forward)\nerror: failed to push some refs to 'https://openshift-cherrypick-robot:CENSORED@github.com/openshift-cherrypick-robot/insights-operator'\nhint: Updates were rejected because the tip of your current branch is behind\nhint: its remote counterpart. Integrate the remote changes (e.g.\nhint: 'git pull ...') before pushing again.\nhint: See the 'Note about fast-forwards' in 'git push --help' for details.\n", error: exit status 1

In response to this:

/cherrypick release-4.4

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-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. 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.

6 participants