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

MGMT-19360: do not monitor hosts with status installed #7030

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adriengentil
Copy link
Contributor

@adriengentil adriengentil commented Nov 26, 2024

Performance test in stage showed that the assisted-service continued to
monitor hosts even after the cluster installed. This behavior consumes
a lot of CPU, this PR disables it.

Also, move the logic from SkipMonitoring function into the SQL query so
we avoid to retrieve hosts that we be skipped anyway (and save some
un-marshaling operations).

Performance test in stage showed that the assisted-service continued to
monitor hosts even after the cluster installed. This behaviour consumes
a lot of CPU, this PR disables it.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 26, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2024

@adriengentil: This pull request references MGMT-19360 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.19.0" version, but no target version was set.

In response to this:

Performance test in stage showed that the assisted-service continued to
monitor hosts even after the cluster installed. This behaviour consumes
a lot of CPU, this PR disables it.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 26, 2024
@adriengentil
Copy link
Contributor Author

/test all

Copy link

openshift-ci bot commented Nov 26, 2024

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 openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 26, 2024
Copy link

openshift-ci bot commented Nov 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adriengentil

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2024
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 68.21%. Comparing base (8dc67a1) to head (01dc47a).

Files with missing lines Patch % Lines
internal/host/monitor.go 80.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7030      +/-   ##
==========================================
- Coverage   68.22%   68.21%   -0.01%     
==========================================
  Files         273      273              
  Lines       39079    39077       -2     
==========================================
- Hits        26660    26656       -4     
- Misses      10007    10008       +1     
- Partials     2412     2413       +1     
Files with missing lines Coverage Δ
internal/host/monitor.go 81.48% <80.00%> (-0.23%) ⬇️

... and 1 file with indirect coverage changes

@openshift-ci openshift-ci bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 26, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2024

@adriengentil: This pull request references MGMT-19360 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.19.0" version, but no target version was set.

In response to this:

Performance test in stage showed that the assisted-service continued to
monitor hosts even after the cluster installed. This behaviour consumes
a lot of CPU, this PR disables it.

Also, move the logic from SkipMonitoring function into the SQL query so
we avoid to retrieve hosts that we be skipped anyway.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2024

@adriengentil: This pull request references MGMT-19360 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.19.0" version, but no target version was set.

In response to this:

Performance test in stage showed that the assisted-service continued to
monitor hosts even after the cluster installed. This behavior consumes
a lot of CPU, this PR disables it.

Also, move the logic from SkipMonitoring function into the SQL query so
we avoid to retrieve hosts that we be skipped anyway (and save some
un-marshaling operations).

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 openshift-eng/jira-lifecycle-plugin repository.

@adriengentil
Copy link
Contributor Author

/test all

@adriengentil adriengentil marked this pull request as ready for review November 26, 2024 16:55
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 26, 2024
@adriengentil
Copy link
Contributor Author

/cc @rccrdpccl @tsorya

@@ -14,13 +14,6 @@ import (
"gorm.io/gorm"
)

func (m *Manager) SkipMonitoring(h *models.Host) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice !!!

funk.Contains(skipMonitoringStates, h.LogsInfo))
return result
}

func (m *Manager) initMonitoringQueryGenerator() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks great , do we have a unit-test for it? if yes lets push

Copy link

openshift-ci bot commented Nov 26, 2024

@adriengentil: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/edge-subsystem-kubeapi-aws 01dc47a link true /test edge-subsystem-kubeapi-aws
ci/prow/edge-subsystem-aws 01dc47a link true /test edge-subsystem-aws

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

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants