Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker versions <1.13 don't work (conflicting --rm and --detach options to docker run) #18

Closed
exarkun opened this issue Mar 14, 2017 · 7 comments
Labels
bug Something isn't working

Comments

@exarkun
Copy link

exarkun commented Mar 14, 2017

What were you trying to do?

Following the instructions on https://datawire.github.io/telepresence/ I was trying to run a local container with telepresence and have it hooked in to an existing deployment which I had added the telepresence container to on my Kubernetes cluster.

I got to the ./telepresence --deployment ... command in "2. Run the local Telepresence client on your machine" and then encountered an exception.

What did you expect to happen?

To have my container started up locally and plumbed into the networking of the pod for the selected deployment.

What happened instead?

Traceback for docker run error, no running container.

Automatically included information

Command line: ['./telepresence', '--deployment', 's4-infrastructure', '--docker-run', 'leastauthority/grid-router']
Version: 0.7
Python version: 2.7.12+ (default, Sep 17 2016, 12:08:02) [GCC 6.2.0 20160914]
OS: Linux baryon 4.8.0-37-generic #39-Ubuntu SMP Thu Jan 26 02:27:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Traceback:

Traceback (most recent call last):
  File "./telepresence", line 197, in call_f
    return f(*args, **kwargs)
  File "./telepresence", line 227, in go
    tempdir, container_id = start_proxy(args)
  File "./telepresence", line 139, in start_proxy
    container_id = unicode(check_output(docker_cmd).strip(), "utf-8")
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['docker', 'run', '--detach', '--rm', '-v', '/home/exarkun:/opt:ro', '-v', '/home/exarkun:/home/exarkun:ro', '-v', '/tmp/tmpjWD__K:/output', 'datawire/telepresence-local:0.7', '1000', 's4-infrastructure', '', '']' returned non-zero exit status 1

@itamarst
Copy link

Thanks for the bug report! I will take a look at this now.

@itamarst
Copy link

You mention conflict between --rm and --detach, was there additional output on stderr you based that on?

@exarkun
Copy link
Author

exarkun commented Mar 14, 2017

Hmm I guess so. I think it was just what docker says if you manually run the command in the traceback though:

$ docker run --detach --rm -v /home/exarkun:/opt:ro -v /home/exarkun:/home/exarkun:ro -v /tmp/tmpjWD__K:/output datawire/telepresence-local:0.7 1000 s4-infrastructure '' ''
Conflicting options: --rm and -d
$

which matches all my other experiences with Docker. Those options don't work together.

I'll try to reproduce and paste exact transcript if that's useful.

@exarkun
Copy link
Author

exarkun commented Mar 14, 2017

$ ./telepresence --deployment s4-infrastructure --docker-run leastauthority/grid-router
Starting proxy...
Conflicting options: --rm and -d

Looks like there's a bug in our code. Sorry about that!

Here's the traceback:

Traceback (most recent call last):
  File "./telepresence", line 197, in call_f
    return f(*args, **kwargs)
  File "./telepresence", line 227, in go
    tempdir, container_id = start_proxy(args)
  File "./telepresence", line 139, in start_proxy
    container_id = unicode(check_output(docker_cmd).strip(), "utf-8")
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['docker', 'run', '--detach', '--rm', '-v', '/home/exarkun:/opt:ro', '-v', '/home/exarkun:/home/exarkun:ro', '-v', '/tmp/tmpYUFsSC:/output', 'datawire/telepresence-local:0.7', '1000', 's4-infrastructure', '', '']' returned non-zero exit status 1


Would you like to file an issue in our issue tracker? We'd really appreciate the help improving our product. [Y/n]: 

@exarkun
Copy link
Author

exarkun commented Mar 14, 2017

telepresence 0.7, Docker version:

$ docker version
Client:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        Wed Oct 26 22:01:48 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        Wed Oct 26 22:01:48 2016
 OS/Arch:      linux/amd64

@itamarst
Copy link

Docker 1.13 is apparently first version that supported --rm and --detach in concert. So will remove that.

@itamarst itamarst changed the title conflicting --rm and --detach options to docker run Docker versions <1.13 don't work (conflicting --rm and --detach options to docker run) Mar 14, 2017
@itamarst itamarst added the bug Something isn't working label Mar 14, 2017
@itamarst itamarst self-assigned this Mar 14, 2017
@itamarst
Copy link

Fixed.

donnyyung pushed a commit that referenced this issue Oct 29, 2021
…dor.io-2021-10-07/release/v2.4

Donaldyung/from getambassador.io 2021 10 07/release/v2.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants