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 1774621: Add OLM CSV metrics #253

Merged
merged 1 commit into from Nov 21, 2019

Conversation

awgreene
Copy link
Contributor

No description provided.

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 25, 2019
@brancz
Copy link
Contributor

brancz commented Oct 25, 2019

I'm aware that OLM has been granted extra budget for time-series, but could you elaborate anyways what the maximum cardinality of this metric is per cluster?

@awgreene
Copy link
Contributor Author

@brancz

I'm aware that OLM has been granted extra budget for time-series, but could you elaborate anyways what the maximum cardinality of this metric is per cluster?

Good question. The metric introduced in this pr consists of 4 labels:

Labels being introduced

Name

This label tracks the name of the CSV (operator) installed. Many operator authors include the version appended to the operator name, so this could change with each install/upgrade of an operator.

Version

This label tracks the version of the CSV (operator) installed. This value will change with each upgrade / install of an operator.

Phase

This label tracks the phases of a CSV as OLM reconciles it. Here is a list of possible phases:

  • ""
  • Pending
  • InstallReady
  • Installing
  • Succeeded
  • Failed
  • Unknown
  • Replacing
  • Deleting

Reason

This label tracks why the CSV is in the given phase. A list of Reasons includes:

  • RequirementsUnknown
  • RequirementsNotMet
  • AllRequirementsMet
  • OwnerConflict
  • InstallComponentFailed
  • InstallComponentFailedNoRetry
  • InvalidInstallStrategy
  • InstallWaiting
  • InstallSucceeded
  • InstallCheckFailed
  • ComponentUnhealthy
  • BeingReplaced
  • Replaced
  • NeedsReinstall
  • NeedsCertRotation
  • APIServiceResourceIssue
  • APIServiceResourcesNeedReinstall
  • APIServiceInstallFailed
  • Copied
  • InvalidInstallModes
  • NoTargetNamespaces
  • UnsupportedOperatorGroup
  • NoOperatorGroup
  • TooManyOperatorGroups
  • InterOperatorGroupOwnerConflict
  • CannotModifyStaticOperatorGroupProvidedAPIs
  • DetectedClusterChange

The potential maximum is quite high, but at this moment it appears that roughly 15 time series are generated when installing a CSV. The average cluster right now has about 3 operators installed - so we can expect roughly 50 time series per cluster.

@brancz
Copy link
Contributor

brancz commented Oct 28, 2019

If I'm counting correctly, this could potentially produce up to 450 time-series per CSV, even if not active all at once. This seems a little excessive. Are there not some states that we are more interested in than others that we could roll up?

cc @smarterclayton

@@ -97,6 +97,9 @@ For the OpenShift 4 Developer Preview we will be sending back these exact attrib
// subscription_sync_total is the number of times an OLM operator
// Subscription has been synced, labelled by name and installed csv
'{__name__="subscription_sync_total"}',
// csv_sync_total is the number of times an OLM operator
// CSV has been synced, labelled by name, version, phase, and reason
'{__name__="csv_sync_total"}',
Copy link
Contributor

Choose a reason for hiding this comment

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

So the total is the current number of times in a row the version/phase/reason has been seen?

Ie if I am (“foo”, “1.0”, “deployed”, “”) 10, and suddenly it fails, will it be (“foo”, “1.0”, “failed”, “reason”) 1?

The description needs to be a bit better.

Copy link
Contributor

@ecordell ecordell Oct 29, 2019

Choose a reason for hiding this comment

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

IIRC, it's the current number of syncs for the csv by name, labelled with the other properites

so your example would be:

  • (“foo”, “1.0”, “deployed”, “”) 10
  • (“foo”, “1.0”, “failed”, “reason”) 11

@smarterclayton
Copy link
Contributor

Can’t we only have one series per operator version live at any time? Or did I misread that.

@ecordell
Copy link
Contributor

ecordell commented Oct 29, 2019

Can’t we only have one series per operator version live at any time? Or did I misread that.

We could do that, but I think I'm missing what that would buy us. Wouldn't the "old" timeseries still be stored in the aggregator for querying, unless we actually do a delete with the client api? Only having one live per operator would make our scrape endpoint a little smaller - but that's about it, right?

@smarterclayton
Copy link
Contributor

Once the old series is dead (5m) we can stop tracking it. After all, if you restart we’d drop all those other states as well. We need some way to control full cardinality - this is definitely important to get right. The bit of info we dont need is the rate of syncs (or it has less value than the others).

Can we reasonably limit the cardinality of this to 2 series at any time per (name,version) - have one modeled like up (where it’s 1 if we are in the succeeded phase), and one which reports 1 if the phase is anything other than success? The current flow is the simplest modeling, but we need to strongly control OLM cardinality somehow.

@ecordell
Copy link
Contributor

That's reasonable and is something we can do, but may be tight to make it for Friday.

Also - this will reduce our total time series but ultimately still leaves the cardinality under user control. I know you know this, but figured it's worth a reminder because you mentioned "strongly controlling" cardinality.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 6, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 6, 2019
@awgreene
Copy link
Contributor Author

@smarterclayton @brancz The suggested changes were implemented in operator-framework/operator-lifecycle-manager#1099

@awgreene
Copy link
Contributor Author

/retest

@awgreene awgreene changed the title Add OLM CSV metrics Bug 1774621: Add OLM CSV metrics Nov 20, 2019
@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 Nov 20, 2019
@openshift-ci-robot
Copy link
Contributor

@awgreene: This pull request references Bugzilla bug 1774621, which is invalid:

  • expected the bug to target the "4.3.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:

Bug 1774621: Add OLM CSV metrics

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.

@awgreene
Copy link
Contributor Author

/bugzilla refresh

@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 Nov 20, 2019
@openshift-ci-robot
Copy link
Contributor

@awgreene: This pull request references Bugzilla bug 1774621, 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.

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 removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Nov 20, 2019
@brancz
Copy link
Contributor

brancz commented Nov 20, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awgreene, brancz

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2019
@openshift-merge-robot openshift-merge-robot merged commit dcce717 into openshift:master Nov 21, 2019
@openshift-ci-robot
Copy link
Contributor

@awgreene: All pull requests linked via external trackers have merged. Bugzilla bug 1774621 has been moved to the MODIFIED state.

In response to this:

Bug 1774621: Add OLM CSV metrics

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/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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants