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

Failed when working locally (make initialize) #7075

Closed
junngo opened this issue Oct 23, 2019 · 7 comments
Closed

Failed when working locally (make initialize) #7075

junngo opened this issue Oct 23, 2019 · 7 comments
Labels
repository:addons-server Issue relating to addons-server

Comments

@junngo
Copy link

junngo commented Oct 23, 2019

Describe the problem and steps to reproduce it:

I'm working build locally. I try to command make initialize.
And I have met error that is Permission denied.

What happened?

The error is as follows:
error1_101023

python3 -m pip install -e .
Obtaining file:///code
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/code/setup.py'"'"'; __file__='"'"'/code/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
         cwd: /code/
    Complete output (2 lines):
    running egg_info
    error: [Errno 13] Permission denied
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Makefile-docker:113: recipe for target 'install_python_dev_dependencies' failed
make: *** [install_python_dev_dependencies] Error 1
Makefile-os:28: recipe for target 'initialize' failed
make: *** [initialize] Error 2

What did you expect to happen?

It should work successfully.

Anything else we should know?

(Please include a link to the page, screenshots and any relevant files.)
I am not sure whether it is related to this issue(#12579 ).
I wonder if I'm the only one who can't work.
Please take a look at the issue.

@EnTeQuAk
Copy link
Contributor

EnTeQuAk commented Oct 23, 2019

It probably is related to mozilla/addons-server#12579 but as we didn't notice any issues during our testing I'd be interested in your setup.

  • Did you docker-compose pull the latest images before running make initialize?
  • What operating system are you running?
  • Generally, docker-compose up -d is working for you? (Check via docker-compose ps and ideally post the result)
  • From inside your git checkout, can you post the results of both
    • $ stat -c '%u' .
    • $ docker-compose exec web stat -c '%u' /code

Thanks!

@junngo
Copy link
Author

junngo commented Oct 23, 2019

Thank you for your answer.
I got the latest version from master branch. And I had command docker-compose pull.
After docker-compose up -d command ran, I checked running containers using command (docker-compose ps). I made sure that everything(docker containers) was working.
After all checks have been completed, I was running make initialize.

The results of the confirmation are as follows.
$ stat -c '%u' : 1000
$ docker-compose exec web stat -c '%u' /code : 1000
check_1022

Thanks.

@junngo
Copy link
Author

junngo commented Oct 29, 2019

I solved the problem.
The above error lacked the authority of the 'olympia.egg-info file'.
egg-info-root

So, I authorized 'olympia.egg-info file'(chown olympia:olympia olympia.egg-info).
'olympia.egg-info file' passed when performing the build, but other files lacked permission(e.g: css file[0], build.py[1] and so on).

I accessed directly in docker shell and directly executed the command.
(chown -R olympia:olympia /deps/ /code/).

It works successfully afterwards :)
Thanks.

[0]
Screenshot from 2019-10-28 20-32-40

[1]
Screenshot from 2019-10-28 21-27-07

@EnTeQuAk
Copy link
Contributor

Ah, interesting. So you had been using (or running make initialize) addons-server before and that made permissions go wonky which doesn't play nicely with the new way we handle permissions.

In theory, this shouldn't happen in a completely clean checkout - or did you do that?

@junngo
Copy link
Author

junngo commented Oct 30, 2019

Yes, I had been using addons-server before. And I clearly did pull upstream source code.
As far as I can see common ground about the files, It include in '.gitignore file'.

For references, I changed permission directly and now it's working without any problems after 'git pull' working.

@junngo
Copy link
Author

junngo commented Nov 13, 2019

I solved this issue. I close the issue.
If someone need to open, Open the issue again.

@junngo junngo closed this as completed Nov 13, 2019
@dbxnr
Copy link

dbxnr commented Jan 13, 2020

I experienced this too on a fresh make initialize , following @junngo the solution was


# chown -R olympia:olympia /code/
$ stat -c '%u' .
1000
$ docker-compose exec web stat -c '%u' /code
1000

@KevinMind KevinMind transferred this issue from mozilla/addons-server May 4, 2024
@KevinMind KevinMind added repository:addons-server Issue relating to addons-server migration:2024 labels May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repository:addons-server Issue relating to addons-server
Projects
None yet
Development

No branches or pull requests

4 participants