scope icon indicating copy to clipboard operation
scope copied to clipboard

scope happily launches with garbled command line args

Open abuehrle opened this issue 8 years ago • 1 comments

For example, by mistake I included the following:

scope launch scope launch --service-token=<XXXXXX>

It did of course launch scope, but didn't do it the second time. Probably should let me do this at all.

abuehrle avatar Nov 04 '16 18:11 abuehrle

The format of the scope command line is the same as pretty much any other golang program, namely

scope launch <options> <other-args>

The boundary between options and args is where the first token is encountered that is not an option. In the above case that is the 2nd scope.

The result is that scope, launch and --service-token=<XXXXX> are each interpreted as app destinations, since that is what <other-args> is used for in scope. In the weavescope logs this shows up as something like

<probe> WARN: 2016/11/07 11:35:54.136602 Cannot resolve scope: lookup scope on 127.0.1.1:53: no such host
<probe> WARN: 2016/11/07 11:35:54.162167 Cannot resolve launch: lookup launch on 127.0.1.1:53: no such host
<probe> WARN: 2016/11/07 11:35:54.162312 Cannot resolve --service-token=<XXXX>: lookup --service-token=<XXXX>: invalid domain name

AFAICT the DNS resolution only happens once, so we could make failures fatal.

rade avatar Nov 07 '16 11:11 rade