Skip to content

[Bug]: New replica group never provisioned if added to a zero-scaled service #3933

@jvstme

Description

@jvstme

Steps to reproduce

  1. Apply this configuration.
    type: service
    name: test-service
    image: nginx
    port: 80
    
    replicas: 0..1
    scaling:
      metric: rps
      target: 1
      scale_down_delay: 10
  2. Request the service so that a new replica is provisioned.
  3. Stop requesting the service and wait until it is scaled to zero.
  4. Apply this configuration.
    type: service
    name: test-service
    image: nginx
    port: 80
    
    replicas:
    - name: new-group
      count: 1

Actual behaviour

After in-place update, the new replica is never provisioned.

⠏ Launching test-service...
 NAME                  BACKEND           GPU  PRICE           STATUS      SUBMITTED   
 test-service                            -    -               submitted   13 mins ago 
    group=0 replica=1                    -    -               submitted   7 mins ago  
    replica=0          aws (eu-north-1)  -    $0.0204 (spot)  terminated  13 mins ago

Expected behaviour

The new replica is provisioned after in-place update.

dstack version

0.20.23

Server logs

[09:41:48] DEBUG    dstack._internal.server.background.pipeline_tasks.base:357 Processing jobs item 8a4ca137-7e89-4240-89b2-ba3f20eb2b7d                   
           DEBUG    dstack._internal.server.background.pipeline_tasks.jobs_submitted:337 job(8a4ca1)test-service-0-1: assignment has started               
           DEBUG    dstack._internal.server.background.pipeline_tasks.jobs_submitted:2395 job(8a4ca1)test-service-0-1: waiting for the run to be assigned to the fleet                                                                                                                           
           DEBUG    dstack._internal.server.background.pipeline_tasks.base:364 Processed jobs item 8a4ca137-7e89-4240-89b2-ba3f20eb2b7d in 0.048

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions