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

[Bug]: Permission denied in assemble #826

Closed
dblock opened this issue Oct 27, 2021 · 0 comments · Fixed by #829
Closed

[Bug]: Permission denied in assemble #826

dblock opened this issue Oct 27, 2021 · 0 comments · Fixed by #829
Assignees
Labels
bug Something isn't working

Comments

@dblock
Copy link
Member

dblock commented Oct 27, 2021

Describe the bug

Cross-platform assemble for Windows running on OSX fails with permission denied.

To reproduce

./build.sh manifests/1.1.0/opensearch-1.1.0.yml --snapshot --platform windows
$ ./assemble.sh builds/manifest.yml 
Installing dependencies in . ...
Installing dependencies from Pipfile.lock (9310b0)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Running ./src/run_assemble.py builds/manifest.yml ...
2021-10-27 16:18:52 INFO     Bundling OpenSearch (x64) on windows into /Users/dblock/source/opensearch-project/opensearch-build/dblock/dist ...
2021-10-27 16:18:59 INFO     Executing "bash /Users/dblock/source/opensearch-project/opensearch-build/dblock/scripts/components/OpenSearch/install.sh -a "/Users/dblock/source/opensearch-project/opensearch-build/dblock/builds" -o "/var/folders/lf/872sgt9n4ld5s20mdj0_5txrds0wb5/T/tmp35_vhag9/opensearch-1.1.0-SNAPSHOT"" in /var/folders/lf/872sgt9n4ld5s20mdj0_5txrds0wb5/T/tmp35_vhag9/opensearch-1.1.0-SNAPSHOT
+ getopts :h:a:o: arg
+ case $arg in
+ ARTIFACTS=/Users/dblock/source/opensearch-project/opensearch-build/dblock/builds
+ getopts :h:a:o: arg
+ case $arg in
+ OUTPUT=/var/folders/lf/872sgt9n4ld5s20mdj0_5txrds0wb5/T/tmp35_vhag9/opensearch-1.1.0-SNAPSHOT
+ getopts :h:a:o: arg
++ dirname /Users/dblock/source/opensearch-project/opensearch-build/dblock/scripts/components/OpenSearch/install.sh
+ DIR=/Users/dblock/source/opensearch-project/opensearch-build/dblock/scripts/components/OpenSearch
+ echo /Users/dblock/source/opensearch-project/opensearch-build/dblock/scripts/components/OpenSearch
/Users/dblock/source/opensearch-project/opensearch-build/dblock/scripts/components/OpenSearch
+ cd /Users/dblock/source/opensearch-project/opensearch-build/dblock/scripts/components/OpenSearch
+ cp ../../../scripts/legacy/tar/linux/opensearch-tar-install.sh /var/folders/lf/872sgt9n4ld5s20mdj0_5txrds0wb5/T/tmp35_vhag9/opensearch-1.1.0-SNAPSHOT/
2021-10-27 16:18:59 INFO     Installing job-scheduler
2021-10-27 16:18:59 INFO     Executing "/var/folders/lf/872sgt9n4ld5s20mdj0_5txrds0wb5/T/tmp35_vhag9/opensearch-1.1.0-SNAPSHOT/bin/opensearch-plugin install --batch file:/var/folders/lf/872sgt9n4ld5s20mdj0_5txrds0wb5/T/tmp35_vhag9/opensearch-job-scheduler-1.1.0.0-SNAPSHOT.zip" in /var/folders/lf/872sgt9n4ld5s20mdj0_5txrds0wb5/T/tmp35_vhag9/opensearch-1.1.0-SNAPSHOT
/bin/sh: /var/folders/lf/872sgt9n4ld5s20mdj0_5txrds0wb5/T/tmp35_vhag9/opensearch-1.1.0-SNAPSHOT/bin/opensearch-plugin: Permission denied
Traceback (most recent call last):
  File "./src/run_assemble.py", line 64, in <module>
    sys.exit(main())
  File "./src/run_assemble.py", line 51, in main
    bundle.install_plugins()
  File "/Users/dblock/source/opensearch-project/opensearch-build/dblock/src/assemble_workflow/bundle.py", line 53, in install_plugins
    self.install_plugin(plugin)
  File "/Users/dblock/source/opensearch-project/opensearch-build/dblock/src/assemble_workflow/bundle_opensearch.py", line 21, in install_plugin
    self._execute(f"{cli_path} install --batch file:{tmp_path}")
  File "/Users/dblock/source/opensearch-project/opensearch-build/dblock/src/assemble_workflow/bundle.py", line 68, in _execute
    subprocess.check_call(command, cwd=self.min_dist.archive_path, shell=True)
  File "/Users/dblock/.pyenv/versions/3.7.11/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/var/folders/lf/872sgt9n4ld5s20mdj0_5txrds0wb5/T/tmp35_vhag9/opensearch-1.1.0-SNAPSHOT/bin/opensearch-plugin install --batch file:/var/folders/lf/872sgt9n4ld5s20mdj0_5txrds0wb5/T/tmp35_vhag9/opensearch-job-scheduler-1.1.0.0-SNAPSHOT.zip' returned non-zero exit status 126.

Expected behavior

No response

Screenshots

If applicable, add screenshots to help explain your problem.

Host / Environment

No response

Additional context

No response

Relevant log output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant