spinnaker/spinnaker · error · UserException

Autoscaling is not supported for this account/region

Error message

Autoscaling is not supported for this account/region

What it means

MonitorTitusScalingPolicy verifies that a newly created/updated scaling policy was applied. It first needs a TitusAutoscalingClient for the event's account/region; when the provider returns null, it throws a UserException because scaling policies cannot be monitored (or used) where autoscaling is unsupported.

Solutions

  1. Configure autoscaling support for the Titus account/region in clouddriver config
  2. Deploy the scaling policy in a region where autoscaling is supported
  3. Remove the scaling policy from the server group description for this account/region

Example fix

# before
serverGroup: { region: "us-central1-a", targetTrackingPolicy: {...} }
# after: drop policy or pick supported region
serverGroup: { region: "us-east-1", targetTrackingPolicy: {...} }
Defensive patterns

Strategy: validation

Validate before calling

if (titusClientProvider.getTitusAutoscalingClient(creds, region) == null) {
  throw new IllegalStateException("Cannot attach scaling policy: autoscaling unsupported in " + region);
}

Type guard

boolean supportsScalingPolicies = (creds, region) -> titusClientProvider.getTitusAutoscalingClient((NetflixTitusCredentials) creds, region) != null;

Try / catch

try { monitorStage(event); } catch (UserException e) { if (e.getMessage().contains("Autoscaling is not supported")) { failFastWithConfigGuidance(); } else { throw e; } }

Prevention

When it happens

Trigger: Titus createServerGroup with a targetTrackingPolicy/stepScalingPolicy into an account/region where getTitusAutoscalingClient returns null; the monitoring task then fails with this message.

Common situations: Deploy with scaling policy targeting an unsupported region; autoscaling endpoint not configured for the account in clouddriver config.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of spinnaker/spinnaker@1d4a5d0f6d (2026-09-10). Data as JSON: /api/errors/af5d3f8f2bbda73c. Report an issue: GitHub.

Appendix: source

Thrown at clouddriver/clouddriver-titus/src/main/java/com/netflix/spinnaker/clouddriver/titus/deploy/actions/MonitorTitusScalingPolicy.java:80

  @Override
  public Result apply(
      @NotNull MonitorTitusScalingPolicy.MonitorTitusScalingPolicyCommand command,
      @NotNull Saga saga) {
    TitusScalingPolicyModified event = saga.getEvent(TitusScalingPolicyModified.class);

    saga.log(
        "Monitored Titus Scaling Policy %s:%s:%s (scalingPolicyId: %s",
        event.getAccount(), event.getRegion(), event.getJobId(), event.getScalingPolicyId());

    AccountCredentials accountCredentials =
        accountCredentialsProvider.getCredentials(event.getAccount());

    TitusAutoscalingClient titusClient =
        titusClientProvider.getTitusAutoscalingClient(
            (NetflixTitusCredentials) accountCredentials, event.getRegion());

    if (titusClient == null) {
      throw new UserException("Autoscaling is not supported for this account/region");
    }

    // make sure the new policy was applied
    retrySupport.retry(
        () -> {
          ScalingPolicyResult updatedPolicy =
              titusClient.getScalingPolicy(event.getScalingPolicyId());
          if (updatedPolicy == null
              || (updatedPolicy.getPolicyState().getState()
                  != ScalingPolicyStatus.ScalingPolicyState.Applied)) {
            throw new IntegrationException("Scaling policy updates have not been applied")
                .setRetryable(true);
          }
          return true;
        },
        10,
        5000,
        false);

View on GitHub (pinned to 1d4a5d0f6d)