rstudio / rstudio/helm

EKS w/ Resource Profiles - Workbench job failure

Open
#583 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

team: workbench
Dominant language
Markdown
Stars
46
Forks
40
Avg merge
4h 3m
Merged PRs (30d)
6

Description

Workbench Job Submission Failure: "Unable to Start the Job" - DebugLog Shows: "errorMessage":"Invalid resource profile for user"}"

Debug Log output:

rstudio-kubernetes-launcher-debug.3.log-2024-10-15T21:05:02.432106Z [rstudio-kubernetes-launcher] DEBUG Queueing response message [msg: {"messageType":8,"requestId":388,"responseId":388,"supportsContainers":true,"config":[{"name":"secret","valueType":"string"},{"name":"serviceAccountName","valueType":"enum","value":"default,hdp-auth-edm-wandisco-writer-sa,hdp-auth-infosphere-edm-reader-sa,org-rs-auth-generic-user-role-sa,rstudio-rstudio-workbench"}],"resourceLimits":[{"type":"cpuCount","defaultValue":"1.000000","maxValue":"8.000000"},{"type":"CPU Request"},{"type":"memory","defaultValue":"2048.000000","maxValue":"65536.000000"},{"type":"Memory Request"}],"placementConstraints":[{"name":"eks.amazonaws.com/nodegroup","value":"rstudio-1-small"},{"name":"eks.amazonaws.com/nodegroup","value":"rstudio-2-medium"},{"name":"eks.amazonaws.com/nodegroup","value":"rstudio-3-large"},{"name":"eks.amazonaws.com/nodegroup","value":"rstudio-4-xlarge"},{"name":"eks.amazonaws.com/nodegroup","value":"rstudio-5-xxlarge"}],"resourceProfiles":[{"name":"1-small","displayName":"1-small","limits":[{"type":"cpuCount","value":"1"},{"type":"memory","value":"2048"},{"type":"AMD GPUs","value":"0"},{"type":"NVIDIA GPUs","value":"0"}]},{"name":"2-medium","displayName":"2-medium","limits":[{"type":"cpuCount","value":"2"},{"type":"memory","value":"8192"},{"type":"AMD GPUs","value":"0"},{"type":"NVIDIA GPUs","value":"0"}]},{"name":"3-large","displayName":"3-large","limits":[{"type":"cpuCount","value":"3"},{"type":"memory","value":"16384"},{"type":"AMD GPUs","value":"0"},{"type":"NVIDIA GPUs","value":"0"}]},{"name":"4-xlarge","displayName":"4-xlarge","limits":[{"type":"cpuCount","value":"4"},{"type":"memory","value":"32768"},{"type":"AMD GPUs","value":"0"},{"type":"NVIDIA GPUs","value":"0"}]},{"name":"5-xxlarge","displayName":"5-xxlarge","limits":[{"type":"cpuCount","value":"8"},{"type":"memory","value":"65536"},{"type":"AMD GPUs","value":"0"},{"type":"NVIDIA GPUs","value":"0"}]}],"images":["000000000000.dkr.ecr.us-east-1.amazonaws.com/rstudio:org-aws-ubuntu2204-2024.04.2a"],"defaultImage":"000000000000.dkr.ecr.us-east-1.amazonaws.com/rstudio:org-aws-ubuntu2204-2024.04.2a","allowUnknownImages":false,"containersUseHostNetwork":false}]
rstudio-kubernetes-launcher-debug.3.log:2024-10-15T21:05:02.464487Z [rstudio-kubernetes-launcher] DEBUG Queueing response message [msg: {"messageType":-1,"requestId":389,"responseId":389,"errorCode":2,"errorMessage":"Invalid resource profile for user"}]

values.yaml - partial

# Controls how many instances of Posit Workbench are created.
replicas: 1

# Configures user home directory shared storage
homeStorage:
  create: true
  mount: true
  path: "/home"
  # The name of the PVC created for Workbench's user home directory shared storage.
  name: workbench-user-pvc

  # The storageClass to use for Workbench's user home directory. Must support RWX.
  # Replace with your storage class name.
  storageClassName: rstudio-efs-sc-retain
  requests:
    storage: 100G

# Configures Workbench shared storage
sharedStorage:
  create: true
  mount: true

  # The name of the PVC created for Workbench's shared storage directory.
  name: workbench-shared-pvc

  # The storageClass to use for Workbench's shared storage directory. Must support RWX.
  # Replace with your storage class name.
  storageClassName: rstudio-efs-sc-retain
  requests:
    storage: 1G

# Creates a test user to verify installation
userCreate: true

# The config section is converted into the correct configuration files and are
# mounted to the server/session pods as needed.
config:
  secret:
    database.conf:
      provider: "postgresql"
      connection-uri: "postgres://rstudio@ha21r51pg.dbar.hdp.example.com:5432/rstudio"
      # While it is possible to set a Postgres password here in the
      # values file, we recommend removing the line above and providing
      # the password at runtime using helm install's --set argument instead
      # (e.g. --set config.secret.database\.conf.password=<your-postgres-password>)
    openid-client-secret:
      client-id: Rstudioconnect # TODO: Change to your client-id
  session:
    rsession.conf:
      # These settings apply to RStudio Pro IDE sessions
      session-timeout-minutes: 60
      session-timeout-suspend: 1
      session-quit-child-processes-on-exit: 1
      # Disable External publishing to shiny.io etc.. https://docs.posit.co/ide/server-pro/hardening/r_session_security.html#disable-external-publishing
      allow-external-publish: 0
    repos.conf:
      # This will set the Posit Public Package Manager (P3M) as the default R repository
      # for Workbench users. This is recommended as P3M provides linux binaries for many
      # R packages which will decrease package installation time. If you have your own
      # Posit Package Manager server then replace these URLs with the URLs of your server.
      CRAN: https://packagemanager.posit.co/cran/__linux__/jammy/latest
  server:
    jupyter.conf:
      # These settings apply to Jupyter Notebook and JupyterLab IDE sessions
      session-cull-minutes: 60
      session-shutdown-minutes: 5
    rserver.conf:
      admin-enabled: 1 # More information at https://docs.posit.co/ide/server-pro/server_management/administrative_dashboard.html
      admin-group: "r-admin"
      auth-openid: 1
      auth-openid-issuer: https://qa.cfed.example.com # TODO: Change to match your IdP
      auth-openid-username-claim: orgauthid # TODO: Verify this works with your IdP. This claim must match the Linux account usernames.
    logging.conf:
      "*":
        log-level: debug
        logger-type: stderr
    launcher.kubernetes.conf:
      enable-debug-logging: 1
    launcher.kubernetes.resources.conf:
      "1-small":
        cpus: "1.0"
        mem-mb: "2048"
      "2-medium":
        cpus: "2.0"
        mem-mb: "8192"
      "3-large":
        cpus: "3.0"
        mem-mb: "16384"
      "4-xlarge":
        cpus: "4.0"
        mem-mb: "32768"
      "5-xxlarge":
        cpus: "8.0"
        mem-mb: "65536"
  profiles:
    launcher.kubernetes.profiles.conf:
      "*":
        # These settings are applied for all users and can be changed to suit
        # your particular user needs. See the following resources for more information:
        # https://github.com/rstudio/helm/tree/main/charts/rstudio-workbench#etcrstudiolauncherkubernetesprofilesconf
        # https://docs.posit.co/ide/server-pro/job_launcher/kubernetes_plugin.html#kube-profiles
        default-cpus: "1.0"
        default-mem-mb: "2048"
        max-mem-mb: "65536"
        allow-unknown-images: 0
        resource-profiles: default,1-small,2-medium,3-large,4-xlarge,5-xxlarge
        default-container-image: "000000000000.dkr.ecr.us-east-1.amazonaws.com/rstudio:org-aws-ubuntu2204-2024.04.2a"
        allow-custom-resources: 0
        placement-constraints: eks.amazonaws.com/nodegroup:rstudio-1-small,eks.amazonaws.com/nodegroup:rstudio-2-medium,eks.amazonaws.com/nodegroup:rstudio-3-large,eks.amazonaws.com/nodegroup:rstudio-4-xlarge,eks.amazonaws.com/nodegroup:rstudio-5-xxlarge
        container-images:
          - "000000000000.dkr.ecr.us-east-1.amazonaws.com/rstudio:org-aws-ubuntu2204-2024.04.2a"
        job-json-overrides:
            - name: org-rs-auth-generic-user-role-sa
              target: /spec/template/spec/serviceAccountName
              json: "org-rs-auth-generic-user-role-sa"
      "@hdp-auth-edm-wandisco-writer":
        # These settings are applied for all users and can be changed to suit
        # your particular user needs. See the following resources for more information:
        # https://github.com/rstudio/helm/tree/main/charts/rstudio-workbench#etcrstudiolauncherkubernetesprofilesconf
        # https://docs.posit.co/ide/server-pro/job_launcher/kubernetes_plugin.html#kube-profiles
        default-cpus: "1.0"
        default-mem-mb: "2048"
        max-cpus: "8.0"
        max-mem-mb: "65536"
        resource-profiles: default,1-small,2-medium,3-large,4-xlarge,5-xxlarge
        job-json-overrides:
            - name: hdp-auth-edm-wandisco-writer-sa
              target: /spec/template/spec/serviceAccountName
              json: "hdp-auth-edm-wandisco-writer-sa"
      "@hdp-auth-infosphere-edm-reader":
        # These settings are applied for all users and can be changed to suit
        # your particular user needs. See the following resources for more information:
        # https://github.com/rstudio/helm/tree/main/charts/rstudio-workbench#etcrstudiolauncherkubernetesprofilesconf
        # https://docs.posit.co/ide/server-pro/job_launcher/kubernetes_plugin.html#kube-profiles
        default-cpus: "1.0"
        default-mem-mb: "2048"
        max-cpus: "8.0"
        max-mem-mb: "65536"
        resource-profiles: default,1-small,2-medium,3-large,4-xlarge,5-xxlarge
        job-json-overrides:
            - name: hdp-auth-infosphere-edm-reader-sa
              target: /spec/template/spec/serviceAccountName
              json: "hdp-auth-infosphere-edm-reader-sa"

Images of Errors:
Screenshot 2024-10-15 at 6 20 45 PM
Screenshot 2024-10-15 at 6 00 37 PM

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the values.yaml resource-profile and per-user profile settings, then compare them with the launcher debug log's advertised profiles and the rejected job request. Determine why the configured user cannot use a listed profile; done means the Workbench job starts successfully with an appropriate resource profile.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes, yaml
Domain
cloud, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.