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

Remove sudo prefix when launching scope in instructions #1594

Closed
foot opened this issue Jun 16, 2016 · 13 comments
Closed

Remove sudo prefix when launching scope in instructions #1594

foot opened this issue Jun 16, 2016 · 13 comments
Assignees
Labels
chore Related to fix/refinement/improvement of end user or new/existing developer functionality
Milestone

Comments

@foot
Copy link
Contributor

foot commented Jun 16, 2016

ewq:~$ eval "$(/usr/local/bin/docker-machine env weave-1)"
ewq:~$ sudo wget -O /usr/local/bin/scope \
>   https://github.com/weaveworks/scope/releases/download/v0.15.0/scope
--2016-06-16 11:08:41--  https://github.com/weaveworks/scope/releases/download/v0.15.0/scope
Resolving github.com... 192.30.252.122
Connecting to github.com|192.30.252.122|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/34659664/bfab7d64-1907-11e6-8489-64d23109519b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160616%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160616T090841Z&X-Amz-Expires=300&X-Amz-Signature=da30ffc94b6289b8090d0e02dd6db8475c1b7690148b2072594ebfcc0926c61a&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dscope&response-content-type=application%2Foctet-stream [following]
--2016-06-16 11:08:41--  https://github-cloud.s3.amazonaws.com/releases/34659664/bfab7d64-1907-11e6-8489-64d23109519b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160616%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160616T090841Z&X-Amz-Expires=300&X-Amz-Signature=da30ffc94b6289b8090d0e02dd6db8475c1b7690148b2072594ebfcc0926c61a&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dscope&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com... 54.231.33.179
Connecting to github-cloud.s3.amazonaws.com|54.231.33.179|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6763 (6.6K) [application/octet-stream]
Saving to: '/usr/local/bin/scope'

100%[==================================================================================================================================================================>] 6,763       --.-K/s   in 0.007s

2016-06-16 11:08:42 (1012 KB/s) - '/usr/local/bin/scope' saved [6763/6763]

ewq:~$ sudo chmod a+x /usr/local/bin/scope
ewq:~$ sudo scope launch --service-token=abc
Post http://%2Fvar%2Frun%2Fdocker.sock/v1.20/containers/create?name=weavescope: dial unix /var/run/docker.sock: connect: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?
ewq:~$

@errordeveloper
Copy link
Contributor

errordeveloper commented Jun 16, 2016

This is probably an issue with one of the extra checks we started doing recently... could you please run this with bash -x, i.e. bash -x /usr/local/bin/scope ..., and provide the output?

@rade rade added this to the 0.16.0 milestone Jun 17, 2016
@2opremio
Copy link
Contributor

2opremio commented Jun 17, 2016

And even more importantly, can you reproduce with master @foot ? (using the scope script in the repository)

@foot
Copy link
Contributor Author

foot commented Jun 17, 2016

Master works locally!

@foot
Copy link
Contributor Author

foot commented Jun 17, 2016

but v0.15.0 works locally too (when checked out from repo)

@foot
Copy link
Contributor Author

foot commented Jun 17, 2016

Ah it is the sudo in sudo scope launch --service-token=abc !

@foot
Copy link
Contributor Author

foot commented Jun 17, 2016

which doesn't use the user's eval'd docker-machine/dlite etc env.

@2opremio
Copy link
Contributor

@foot Mind opening a ticket in service ?

Closing this one.

@2opremio 2opremio reopened this Jun 17, 2016
@2opremio
Copy link
Contributor

2opremio commented Jun 17, 2016

Actually, we should also fix the instructions from the docs not just the ones printed in the service ... reopening.

@foot Can you check if sudo -E makes it work?

@2opremio
Copy link
Contributor

I am thinking we shouldn't tell users to run sudo, it's up to them to have permissions to access the docker socket or not. Thoughts?

@foot
Copy link
Contributor Author

foot commented Jun 17, 2016

sudo -E makes it work.

I'd lean more towards removing that final sudo. If they do need it, "permission denied" is a more familiar error case to handle than your env not being inherited. (For me at least).

@2opremio
Copy link
Contributor

Agreed. Will rename the issue and remove the 0.16 milestone

@2opremio 2opremio removed this from the 0.16.0 milestone Jun 17, 2016
@2opremio 2opremio changed the title README install instructions don't work under OSX Remove sudo prefix when launching scope in instructions Jun 17, 2016
@2opremio
Copy link
Contributor

2opremio commented Jun 17, 2016

  • Update service instructions as well

@rade
Copy link
Member

rade commented Jun 17, 2016

To be clear, the 'sudo' should be removed from the 'scope launch' only, not the preceding two lines.

@rade rade added the chore Related to fix/refinement/improvement of end user or new/existing developer functionality label Jul 4, 2016
@rade rade modified the milestone: July2016 Jul 4, 2016
@2opremio 2opremio modified the milestones: July2016, 0.16.1 Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Related to fix/refinement/improvement of end user or new/existing developer functionality
Projects
None yet
Development

No branches or pull requests

4 participants