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

Add dry run flag to scope, so when launched we can check the args are valid. #1609

Merged
merged 3 commits into from
Jun 27, 2016

Conversation

tomwilkie
Copy link
Contributor

@tomwilkie tomwilkie commented Jun 23, 2016

Fixes #1191, fixes #1559, fixes #1548

@jml
Copy link
Contributor

jml commented Jun 24, 2016

Code changes are fine, but when I downloaded this branch and tried it out it didn't behave as I expected:

$ git checkout origin/check-args
$ make
...
$ ./scope launch --dry-run
b0ea1a0f2c481515e4eebfc781ee144d5561d61caa503e570f766c45bea5a655
Weave Scope is reachable at the following URL(s):
  * http://192.168.99.100:4040/
  * http://10.0.2.15:4040/
$ docker ps | grep b0ea
b0ea1a0f2c48        weaveworks/scope:latest                                            "/home/weave/entrypoi"   21 seconds ago      Up 21 seconds                                weavescope

I would have expected the docker container to terminate, and to not have been given a URL at which scope was reachable.

@jml jml assigned tomwilkie and unassigned jml Jun 24, 2016
@tomwilkie
Copy link
Contributor Author

Doing that you'll end up with a container stuck in a loop (scope exiting, the watchdog restarting it).

I could add a check to entrypoint.sh to block this, but entrypoint.sh has been nothing but trouble and one of the aims of this PR is to remove functionality from it. So as agreed I don't do that.

In the end I just documented that -dry-run is for internal use only.

@tomwilkie tomwilkie assigned jml and unassigned tomwilkie Jun 24, 2016
@jml
Copy link
Contributor

jml commented Jun 24, 2016

LGTM.

@jml jml removed their assignment Jun 24, 2016
@tomwilkie tomwilkie merged commit 8e1a6b3 into master Jun 27, 2016
@tomwilkie tomwilkie deleted the check-args branch June 27, 2016 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants