spinnaker/spinnaker · error · TitusException

Titus does not support percentage-based disabling for…

Error message

Titus does not support percentage-based disabling for server groups in one or more target groups

What it means

Spinnaker Clouddriver's Titus enable/disable action throws this when a disable operation specifies a desiredPercentage (Monitored Deploy style percentage-based disabling) while the Titus job has 'spinnaker.targetGroups' labels, i.e. the server group is attached to load balancer target groups. Titus's API cannot express percentage-based disabling per target group, so the action rejects it up front with a TitusException.

Solutions

  1. Remove the desiredPercentage from the disable description so the disable applies to the whole server group instead of a percentage
  2. Detach target groups from the Titus server group or use a server group without the spinnaker.targetGroups label if percentage-based disabling is required
  3. Use instance-count based disable/resize instead of percentage-based disabling for Titus server groups with load balancers

Example fix

// before (pipeline disable stage)
{ "desiredPercentage": 50, "serverGroupName": "myapp-v001" }
// after: drop percentage, disable all instances or size accordingly
{ "serverGroupName": "myapp-v001" }
Defensive patterns

Strategy: validation

Validate before calling

if (desc.getDesiredPercentage() != null && job.getLabels().containsKey("spinnaker.targetGroups")) {
  throw new IllegalArgumentException("Use non-percentage disable: Titus cannot disable by percentage for target-group-attached server groups");
}

Type guard

boolean supportsPercentageDisable = (job, desc) -> desc.getDesiredPercentage() == null || !job.getLabels().containsKey("spinnaker.targetGroups");

Try / catch

try { disable(desc); } catch (TitusException e) { if (e.getMessage().contains("percentage-based disabling")) { disableWithoutPercentage(desc); } else { throw e; } }

Prevention

When it happens

Trigger: Running a disableServerGroup (or monitored deploy auto-disable stage) on a Titus server group with a Description whose getDesiredPercentage() is non-null and whose job labels contain 'spinnaker.targetGroups', with a non-null TitusLoadBalancerClient.

Common situations: Users configure a Monitored Deploy/percentage-based rollback against a Titus job that is registered with target-group load balancers; the combination is simply unsupported by the Titus backend.

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/85d85d3b807f9613. Report an issue: GitHub.

Appendix: source

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

      TitusLoadBalancerClient titusLoadBalancerClient =
          titusClientProvider.getTitusLoadBalancerClient(
              description.getCredentials(), description.getRegion());

      String serverGroupName = description.getServerGroupName();
      String region = description.getRegion();

      Job job = titusClient.findJobByName(serverGroupName, true);
      if (job == null) {
        saga.log("No job named '%s' found in %s", serverGroupName, region);
        return;
      }

      if (shouldDisable
          && titusLoadBalancerClient != null
          && description.getDesiredPercentage() != null) {
        if (job.getLabels().containsKey("spinnaker.targetGroups")) {
          throw new TitusException(
              "Titus does not support percentage-based disabling for server groups in one or more target groups");
        }
      }

      // If desired percentage is part of the description (ie. Monitored Deploy), disable the job
      // only if it's set to 100
      if (shouldDisable && description.getDesiredPercentage() != null) {
        if (description.getDesiredPercentage() == 100) {
          saga.log("Disabling job (desiredPercentage: %d)", description.getDesiredPercentage());
          activateJob(titusClient, job, false);
          saga.log("Disabled job (desiredPercentage: %d)", description.getDesiredPercentage());
        } else {
          saga.log("Not disabling job (desiredPercentage: %d)", description.getDesiredPercentage());
        }
      } else {
        activateJob(titusClient, job, !shouldDisable);
      }

View on GitHub (pinned to 1d4a5d0f6d)