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

Missing diagnostics on permission problems #2847

Open
eserte opened this issue Jan 17, 2020 · 4 comments
Open

Missing diagnostics on permission problems #2847

eserte opened this issue Jan 17, 2020 · 4 comments

Comments

@eserte
Copy link

eserte commented Jan 17, 2020

Consider the following run, which roughly simulates a system where sitespeed.io was upgraded from pre-v11.0.0 to v11.0.00 or later:

$ mkdir sitespeed; docker run --rm -v $(pwd)/sitespeed:/sitespeed.io sitespeedio/sitespeed.io:10.3.2 --browsertime.iterations 1 -b chrome https://www.sitespeed.io/
Google Chrome 77.0.3865.75 
Mozilla Firefox 69.0
[2020-01-17 13:20:25] INFO: Versions OS: linux 4.4.0-21-generic nodejs: v10.16.0 sitespeed.io: 10.3.2 browsertime: 6.1.4 coach: 4.1.0
[2020-01-17 13:20:25] INFO: Running tests using Chrome - 1 iteration(s)
[2020-01-17 13:20:27] INFO: Testing url https://www.sitespeed.io/ iteration 1
[2020-01-17 13:20:38] INFO: https://www.sitespeed.io/ 13 requests, backEndTime: 194ms, firstPaint: 286ms, firstVisualChange: 300ms, DOMContentLoaded: 276ms, Load: 297ms, speedIndex: 306, visualComplete85: 334ms, lastVisualChange: 334ms, rumSpeedIndex: 286
[2020-01-17 13:20:39] INFO: HTML stored in /sitespeed.io/sitespeed-result/www.sitespeed.io/2020-01-17-13-20-25
$ docker run --rm -v $(pwd)/sitespeed:/sitespeed.io sitespeedio/sitespeed.io:11.0.0 --browsertime.iterations 1 -b chrome https://www.sitespeed.io/            
Google Chrome 78.0.3904.87 
Mozilla Firefox 70.0

... with no further output, and exit code is 1. With more research (strace logging...) it seems that the sitespeed run fails because of permission problems, and needs to be fixed by changing the ownership of sitespeed-result:

$ sudo chown -R $(stat --format=%u sitespeed):$(stat --format=%g sitespeed) sitespeed/sitespeed-result

It would be nice if sitespeed would not die silently in this situation, but clearly say that it could not create files/directories, with the filenames and the reason.

@soulgalore
Copy link
Member

soulgalore commented Jan 17, 2020

Hi @eserte there was a fix some time ago to avoid using root inside the container and to pickup the current user see #2710 and #1459 - I guess that's where something goes wrong?

Just so I understand: You run twice as the same user, but the second time you get the failure? Thinking on how I can reproduce.

@eserte
Copy link
Author

eserte commented Jan 17, 2020

Yes, I know about the user changes. I am just complaining about the missing error messages.

For reproducing: just execute the two commands in the first code block.

@soulgalore
Copy link
Member

You mean:

mkdir sitespeed; docker run --rm -v $(pwd)/sitespeed:/sitespeed.io sitespeedio/sitespeed.io:10.3.2 --browsertime.iterations 1 -b chrome https://www.sitespeed.io/
docker run --rm -v $(pwd)/sitespeed:/sitespeed.io sitespeedio/sitespeed.io:11.0.0 --browsertime.iterations 1 -b chrome https://www.sitespeed.io/

That works for me on OS X. What OS are you using, see if I can reproduce?

@eserte
Copy link
Author

eserte commented Jan 23, 2020

Linux Mint18, which is roughly a Ubuntu 16.04.

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

No branches or pull requests

2 participants