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

Fix: Add daemon arg to docker run in dockeripfs plugin. #80

Merged
merged 1 commit into from
Sep 10, 2018

Conversation

dgrisham
Copy link
Member

@dgrisham dgrisham commented Sep 10, 2018

This PR adds daemon to the end of the docker run args whenever the user passes in <ipfs-args> to iptb start -- <ipfs-args>. Without this additional argument, the IPFS daemon logs a deprecation warning:

$ iptb auto --type dockeripfs --count 1
$ iptb start -- --enc=json
$ docker logs $(cat $IPTB_ROOT/testbeds/default/0/dockerid)
Changing user to ipfs
ipfs version 0.4.17
Found IPFS fs-repo at /data/ipfs
DEPRECATED: arguments have been set but the first argument isn't 'daemon'
DEPRECATED: run 'docker run ipfs/go-ipfs daemon --enc=json' instead
DEPRECATED: see the following PRs for more information:
DEPRECATED: * https://github.com/ipfs/go-ipfs/pull/3573
DEPRECATED: * https://github.com/ipfs/go-ipfs/pull/3685
Initializing daemon...
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/172.17.0.73/tcp/4001
Swarm listening on /p2p-circuit/ipfs/QmeC2PYtwk5zygCKXpCBkdTS995FfCKK4wf6TjYSJP2UJx
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/172.17.0.73/tcp/4001
API server listening on /ip4/0.0.0.0/tcp/5001
Daemon is ready

We don't pass daemon into docker run when the user hasn't provided additional args, because docker run has default args when nothing else is passed.

For more info, see the PRs listed in the log output:

This commit adds `daemon` to the end of the `docker run` args whenever the user
passes in `<ipfs-args>` to `iptb start -- <ipfs-args>`. Without this additional
argument, the IPFS daemon logs a deprecation warning. We don't want to pass
`daemon` into `docker run` when the user hasn't provided additional args,
because `docker run` has default args when nothing else is passed.

For more info, see:

-   ipfs/kubo#3573
-   ipfs/kubo#3685

License: MIT
Signed-off-by: David Grisham <[email protected]>
Copy link
Member

@travisperson travisperson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@travisperson travisperson merged commit 7ec7d1d into master Sep 10, 2018
@dgrisham dgrisham deleted the fix/docker-run-daemon-arg branch September 11, 2018 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants