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.

config.sh --replace flag is not working

See original GitHub issue

Describe the bug – replace in config.sh setup script is not working

To Reproduce Steps to reproduce the behavior:

  1. Have a worker named myworker already configured
  2. Run ./config.sh --unattended --url https://mygitserver/myorg --token mytoken --replace --name myworker
  3. See it failing

Expected behavior Replace flag should make the config script to overwrite the worker currently present in the api.

Runner Version and Platform

2.277.1 Ubuntu 20.04 X86

What’s not working?

Replace Flag does not behave it should according to ./config.sh --help

...
 --replace              Replace any existing runner with the same name (default false)
...
Examples:
...
Configure a runner non-interactively, replacing any existing runner with the same name:
  ./config.sh --unattended --url <url> --token <token> --replace [--name <name>]
...

Runner and Worker’s Diagnostic Logs

./config.sh --unattended --url https://mygitserver/myorg --token mytoken --replace  --name myworker

--------------------------------------------------------------------------------
|        ____ _ _   _   _       _          _        _   _                      |
|       / ___(_) |_| | | |_   _| |__      / \   ___| |_(_) ___  _ __  ___      |
|      | |  _| | __| |_| | | | | '_ \    / _ \ / __| __| |/ _ \| '_ \/ __|     |
|      | |_| | | |_|  _  | |_| | |_) |  / ___ \ (__| |_| | (_) | | | \__ \     |
|       \____|_|\__|_| |_|\__,_|_.__/  /_/   \_\___|\__|_|\___/|_| |_|___/     |
|                                                                              |
|                       Self-hosted runner registration                        |
|                                                                              |
--------------------------------------------------------------------------------

# Authentication


√ Connected to GitHub

# Runner Registration




A runner with the name myworker already exists.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
f0rkzcommented, May 20, 2022

I don’t believe this is actually fixed.

2reactions
fhammerlcommented, Jun 10, 2021

👋 Hi @FloThinksPi, thank you for reporting this.

First,

As far as i can tell one also does not get prompted interactively if one wants to replace the runner.

Running config.sh with the --unattended argument will prevent interactive prompts.

Steps to reproduce the behavior:

Tried to repro on Ubuntu using version 2.227.1. I downloaded the runner two times and configured them one after the other using the same names. The 2nd runner replaced the 1st one without problem. Does it fail for you on a completely new runner as well? I.e, simply after following these steps and configuring them?

# Create a folder
mkdir actions-runner && cd actions-runner
# Download the latest runner package
curl -O -L https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-x64-2.277.1.tar.gz
# Extract the installer
tar xzf ./actions-runner-linux-x64-2.277.1.tar.gz
Read more comments on GitHub >

github_iconTop Results From Across the Web

Sed flag is not working
I have 3000 words that are repeated (ARG ARG ARG ARG ....) I am trying to search and replace the 500th word by...
Read more >
sed throws 'bad flag in substitute command'
In your command s/\/fonts/../fonts/ is being taken as the parameter to the -i option (the suffix to use for the backup file), ...
Read more >
Replacing a line with SED not working [duplicate]
Figured it out. Apparently I need to include the -i flag to actually edit the file. So I am using -ri instead of...
Read more >
Basic commands for WSL
If you running WSL on Windows 10 or an older version, you may need to include the -d flag with the --install command...
Read more >
Java Threads - Page 51 - Google Books Result
The other method , freeBusyFlag ( ) , frees the flag by setting it back to null . This imple- mentation seems to...
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