question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cml cloud runner doesn't receive runner token

See original GitHub issue

Hi everybody, I saw some other issues like this, but the instructions there didn’t seem to help.

We are trying to set up a CML pipeline using azure VMs for the heavy lifting. We have adapted all the necessary things in the docker-machine command

docker-machine create -d azure
      --azure-subscription-id $(az account show --query "id" -o tsv)
      --azure-client-id ${AZURE_SP_APP_ID}
      --azure-client-secret ${AZURE_SP_PASSWORD}
      --azure-location westeurope
      --azure-ssh-user cml_runner
      --azure-size $MACHINE_SIZE
      --azure-resource-group $RESOURCE_GROUP
      --azure-vnet $VNET
      --azure-subnet $SUBNET
      --azure-open-port 6006 
      $MACHINE

Now this works and the subsequent setting up of the NVIDIA drivers (following the same as in your blogpost and that seems to work. But then when we try to run the docker container, the runner is never registered in gitlab. We use this command:

docker run --name runner --gpus all -d
        -v /docker_machine/machine:/root/.docker/machine
        -e DOCKER_MACHINE=$MACHINE
        -e repo_token=$repo_token
        -e RUNNER_LABELS=$RUNNER_LABELS
        -e RUNNER_REPO=$CI_PROJECT_URL
        -e RUNNER_IDLE_TIMEOUT=600
        dvcorg/cml-py3

When I tested the setup locally on my machine and run the docker container in the foreground, I get this output:

Unregistering runner
Runtime platform                                    arch=amd64 os=linux pid=17 revision=86ad88ea version=13.3.0
Running in system-mode.                            
                                                   
Shutting down docker machine
Error: RUNNER_TOKEN is needed to start the runner. Are you setting a runner?
    at run (/cml/bin/cml-cloud-runner-entrypoint.js:86:11)

So I guess the call for the runner token seems to fail somehow. Is there a possibility that azure somehow blocks the request to the gitlab api or are we missing something obvious here? We checked the repo_token’s permission, so that should be okay. Can some other repository settings interfere here?

If you need more info about our system, feel free to ask.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
MaxHuerlimanncommented, Sep 7, 2020

It is running now, but in a first quick test it seemed to be working. Thanks a lot for the help and the development of the tool! 😃

1reaction
DavidGOrtegacommented, Sep 3, 2020

@MaxHuerlimann sorry for the late reply. Im working on this today would be awesome if you can check during the PR

Read more comments on GitHub >

github_iconTop Results From Across the Web

`cml runner` failure edge case · Issue #906 - GitHub
Documenting an edge case that happened during a daily pulse check, the cml runner command failed but created an instance that was left...
Read more >
Self-hosted Runners | CML
When a workflow requires computational resources (such as GPUs), CML can automatically allocate cloud instances using cml runner . You can spin up...
Read more >
Pipeline gets stuck in a job when a self-hosted runner ... - GitLab
Summary Im launching a self-hosted runner using CML, that its picking a job of the pipeline shown below. If I disconnect...
Read more >
Using CI/CD Pipelines for Infrastructure Configuration and ...
In this blog, we will install GitLab CE and get it ready for the next ... For my environment I have used the...
Read more >
DVC + Github Actions + GCP Storage - Questions
get access to the Google Cloud Storage object., 401 Traceback (most recent call last): File "/home/runner/.local/lib/python3.8/site-packages/gcsfs/retry.py", ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found