Skip to content

[Bug] incorrect RBG_ROLE_INDEX series env var for roleinstance workload type #213

@JasonHe-WQ

Description

@JasonHe-WQ

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 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.
  • 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.
  • 5. Please use English, otherwise it will be closed.

Describe the bug

Some envs are blank, e.g. RBG_ROLE_INDEX.

And some could not be marshaled, e.g. RBG_LWP_LEADER_ADDRESS

root@serving-v2hbfa5wai-rbg-integrate-0-0:/# env | grep ROLE
RBG_ROLE_INSTANCE_NAME=serving-v2hbfa5wai-rbg-integrate-0
RBG_ROLE_INDEX=
RBG_ROLE_NAME=integrate
RBG_LWP_LEADER_ADDRESS=$(RBG_ROLE_INSTANCE_NAME)-0.s-serving-v2hbfa5wai-rbg-integrate.project-infra

Root Cause

  • RBG_ROLE_INDEX: hardcoded apps.kubernetes.io/pod-index label, should use
    rbg.workloads.x-k8s.io/role-instance-index for RoleInstanceSet.
  • RBG_LWP_LEADER_ADDRESS: env merge logic used a map + sort, which broke
    Kubernetes's sequential $(VAR) resolution order.

Reproduction

any RBG using roleinstance with stateful pattern

Environment

latest 0.7.0 alpha1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions