rbg icon indicating copy to clipboard operation
rbg copied to clipboard

[Bug] Condition of RestartInProgress maybe covered sometimes

Open ShirleyDing opened this issue 2 months ago • 0 comments

Checklist

  • [x] 1. I have searched related issues but cannot get the expected help.
  • [x] 2. The bug has not been fixed in the latest version.
  • [x] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
  • [x] 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
  • [x] 5. Please use English, otherwise it will be closed.

Describe the bug

When restartPolicy is set to RecreateRBGOnPodRestart, if a Pod belonging to the underlying RoleBasedGroup (RBG) is restarted, the controller will delete and recreate all workloads managed by that RBG, after all workloads restarted, the controller will set the condition of RestartInProgress to 'RBGRestartCompleted', so that the next pod restart will be processed. But sometime the condition of 'RestartInProgress' in RBGStatus maybe covered by updating roleStatus. The condition we expected is:

conditions:
    ... 
    - lastTransitionTime: "xxxxxx"
      message: RBG Restart Completed
      reason: RBGRestartCompleted
      status: "False"
      type: RestartInProgress

But sometimes it gets stuck in the state below:

conditions:
    ... 
    - lastTransitionTime: "xxxxxx"
      message: RBG Restart in progress
      reason: RBGRestart
      status: "True"
      type: RestartInProgress

If the condition can't change to RBGRestartCompleted, the next pod restart action will not be processed.

Reproduction

  • Deploy the corresponding YAML
apiVersion: workloads.x-k8s.io/v1alpha1
kind: RoleBasedGroup
metadata:
  name: restart-policy
spec:
  roles:
    - name: sts
      restartPolicy: RecreateRBGOnPodRestart
      replicas: 2
      template:
        metadata:
          labels:
            appVersion: v1
        spec:
          containers:
            - name: sts
              image: anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/nginx:1.14.1-8.6
              ports:
                - containerPort: 80
  • Manually delete the created Pod
  • Observe the conditions of RBGStatus
  • If there is no reproduction, delete the pod, observe the RBGStatus and try several more times

Environment

normal

ShirleyDing avatar Nov 06 '25 09:11 ShirleyDing