Skip to content

TASK_INDEX environment variables are not being set for a job with more than one replica #1082

@sponsology

Description

@sponsology

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:
When running a job with more than 1 replica, the VC_TASK_INDEX and VK_TASK_INDEX environment variables aren't set in the pod environment.

What you expected to happen:
The *_TASK_INDEX variables to be set.

How to reproduce it (as minimally and precisely as possible):
Submit a job using a spec like

apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
  name: test-job
spec:
  schedulerName: volcano
  tasks:
    - replicas: 2
      name: test
      template:
        spec:
          containers:
            - image: "ubuntu:18.04"
              name: dev9
              command: ["bash"]
              args: ["-c", "env"]
              resources:
                requests:
                  cpu: "1000m"
                limits:
                  nvidia.com/gpu: 1
          affinity:
            nodeAffinity:
              preferredDuringSchedulingIgnoredDuringExecution:
                - weight: 1
                  preference:
                    matchExpressions:
                      - key: lifecycle
                        operator: In
                        values:
                          - spot

and you can observe the variables are not set

Anything else we need to know?:
No

Environment:

  • Volcano Version: master branch as at October 8 2020
  • Kubernetes version (use kubectl version): Server Version: version.Info{Major:"1", Minor:"17+", GitVersion:"v1.17.9-eks-4c6976", GitCommit:"4c6976793196d70bc5cd29d56ce5440c9473648e", GitTreeState:"clean", BuildDate:"2020-07-17T18:46:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration: AWS EKS
  • OS (e.g. from /etc/os-release):
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
  • Kernel (e.g. uname -a): Linux ip-10-62-55-52.us-west-2.compute.internal 4.14.198-152.320.amzn2.x86_64 #1 SMP Wed Sep 23 23:57:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: Installed via deployment yaml
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions