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

Never use custom metrics interface for signalfx metrics adapter, PAASTA-17091 #2979

Merged
merged 5 commits into from Nov 30, 2020

Conversation

EvanKrall
Copy link
Member

The first commit, ec85007, makes it so we don't ever use the custom metrics interface for the signalfx metrics adapter, only the external interface.

The second commit, e76906f, removes all code dealing with horizontal_autoscaling, since nothing uses this, and the first commit likely introduces a bug in this code w.r.t. uwsgi autoscaling. (It would generate signalflow code that would query all uwsgi timeseries with no filtering.)

…akes Paasta always generate HPA configurations that use the external metrics interface to access the Signalfx metrics adapter. PAASTA-17091.

Known issue: this produces bogus signalflow code for horizontal_autoscaling uwsgi -- the code generated will query all uwsgi time series, without filtering.
@EvanKrall EvanKrall requested a review from stug November 21, 2020 02:08
Comment on lines 535 to 541
if (
autoscaling_params.get("forecast_policy") == "moving_average"
or "offset" in autoscaling_params
or load_system_paasta_config().get_hpa_always_uses_external_for_signalfx()
):
hpa_metric_name = self.namespace_external_metric_name(metrics_provider)
signalflow = LEGACY_AUTOSCALING_SIGNALFLOW.format(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this means that all instances using the metrics_provider: uwsgi or http will end up with an implicit forecast_policy: moving_average -- is that what we want?

Copy link
Contributor

Choose a reason for hiding this comment

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

(oops meant to start a review -- not done!)

Copy link
Contributor

Choose a reason for hiding this comment

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

(There probably aren't too many instances using uwsgi or http without moving_average I bet)

Copy link
Contributor

@stug stug left a comment

Choose a reason for hiding this comment

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

I think this looks roughly good but I want to confirm that we're ok with forcing everything to use moving_average (my guess is that's ok?)

I also didn't look super closely at the removed itest yelpsoaconfigs -- it doesn't really look like we're losing any coverage, but can you confirm that's the case?

Comment on lines -195 to -198
"horizontal_autoscaling": {
"type": "object",
"additionalProperties": false,
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like there's one instance of compute-infra-test-service in norcal-stagef still using this section, so you probably need to change/remove it before shipping this

Comment on lines 535 to 541
if (
autoscaling_params.get("forecast_policy") == "moving_average"
or "offset" in autoscaling_params
or load_system_paasta_config().get_hpa_always_uses_external_for_signalfx()
):
hpa_metric_name = self.namespace_external_metric_name(metrics_provider)
signalflow = LEGACY_AUTOSCALING_SIGNALFLOW.format(
Copy link
Contributor

Choose a reason for hiding this comment

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

(There probably aren't too many instances using uwsgi or http without moving_average I bet)

@EvanKrall EvanKrall merged commit 7ff9e4d into master Nov 30, 2020
nemacysts added a commit that referenced this pull request May 21, 2021
* Add autoscaling configuration validation

Let's ensure that people don't try to set a (setpoint, offset)
pair that is invalid.

NOTE: I've deleted the existing autoscaling validation code as it was
only checking for an autoscaling configuration that we moved away from
(`horizontal_autoscaling`) - see #2582 for the initial implementation of
this and #2979 for its removal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants