Skip to content

RPM build for core dashboards failed in fpm assemble step #1887

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

Closed
tianleh opened this issue Mar 31, 2022 · 3 comments · Fixed by #1888
Closed

RPM build for core dashboards failed in fpm assemble step #1887

tianleh opened this issue Mar 31, 2022 · 3 comments · Fixed by #1888

Comments

@tianleh
Copy link
Member

tianleh commented Mar 31, 2022

When running RPM build for OSD 1.3.0 from infra's docker container, the following error shows up. (sample run)

The input manifest is https://github.com/opensearch-project/opensearch-build/blob/main/manifests/1.3.0/opensearch-dashboards-1.3.0.yml
The command is Running ./src/run_build.py manifests/1.3.0/opensearch-dashboards-1.3.0.yml -d rpm -p linux -a x64 ...


│ info $ fpm --force -t rpm --package /tmp/tmp8l74j355/OpenSearch-Dashboards/target/NAME-1.3.0-ARCH.TYPE -s dir --name opensearch-dashboards --description Explore and visualize your OpenSearch data --version 1.3.0 --url https://opensearch.org/ --vendor OpenSearch --maintainer OpenSearch Dashboards Team <[email protected]> --license ASL 2.0 --conflicts opensearch-dashboards --after-install /tmp/tmp8l74j355/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/package_scripts/post_install.sh --before-install /tmp/tmp8l74j355/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/package_scripts/pre_install.sh --before-remove /tmp/tmp8l74j355/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/package_scripts/pre_remove.sh --after-remove /tmp/tmp8l74j355/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/package_scripts/post_remove.sh --config-files /etc/opensearch-dashboards/opensearch_dashboards.yml --template-value user=opensearch-dashboards --template-value group=opensearch-dashboards --template-value optimizeDir=/usr/share/opensearch-dashboards/optimize --template-value configDir=/etc/opensearch-dashboards --template-value pluginsDir=/usr/share/opensearch-dashboards/plugins --template-value dataDir=/var/lib/opensearch-dashboards --exclude usr/share/opensearch-dashboards/config --exclude usr/share/opensearch-dashboards/data --exclude usr/share/opensearch-dashboards/assets --architecture x64 --rpm-os linux /tmp/tmp8l74j355/OpenSearch-Dashboards/build/opensearch-dashboards-1.3.0-linux-x64/=/usr/share/opensearch-dashboards/ /tmp/tmp8l74j355/OpenSearch-Dashboards/build/opensearch-dashboards-1.3.0-linux-x64/config/=/etc/opensearch-dashboards/ /tmp/tmp8l74j355/OpenSearch-Dashboards/build/opensearch-dashboards-1.3.0-linux-x64/data/=/var/lib/opensearch-dashboards/ /tmp/tmp8l74j355/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/service_templates/sysv/=/ /tmp/tmp8l74j355/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/service_templates/systemd/=/
   │ERROR failure 0 sec
   │ERROR Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
   │          at Socket.onclose (internal/streams/end-of-stream.js:52:15)
   │          at Socket.emit (events.js:203:15)
   │          at Pipe._handle.close (net.js:607:12)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2022-03-31 16:58:57 ERROR    Error building OpenSearch-Dashboards, retry with: ./build.sh manifests/1.3.0/opensearch-dashboards-1.3.0.yml --component OpenSearch-Dashboards
Traceback (most recent call last):
  File "./src/run_build.py", line 80, in <module>
    sys.exit(main())
  File "./src/run_build.py", line 68, in main
    builder.build(build_recorder)
  File "/var/jenkins/workspace/Playground/tianleh-test/tianleh-osd-build-3-22@2/src/build_workflow/builder_from_source.py", line 55, in build
    self.git_repo.execute(build_command)
  File "/var/jenkins/workspace/Playground/tianleh-test/tianleh-osd-build-3-22@2/src/git/git_repository.py", line 83, in execute
    subprocess.check_call(command, cwd=cwd, shell=True)
  File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'bash /var/jenkins/workspace/Playground/tianleh-test/tianleh-osd-build-3-22@2/scripts/components/OpenSearch-Dashboards/build.sh -v 1.3.0 -p linux -a x64 -d rpm -s false -o builds' returned non-zero exit status 1.

@tianleh
Copy link
Member Author

tianleh commented Mar 31, 2022

This is blocking the testing for OSD RPM Jenkins job on https://github.com/opensearch-project/opensearch-build/pull/1807/files

cc @kavilla @peterzhuamazon @zelinh

@peterzhuamazon peterzhuamazon changed the title RPM build failed RPM build failed in fpm assemble step Mar 31, 2022
@peterzhuamazon peterzhuamazon changed the title RPM build failed in fpm assemble step RPM build for core dashboards failed in fpm assemble step Mar 31, 2022
@peterzhuamazon
Copy link
Member

Success in my local with this:


   │ info $ fpm --force -t rpm --package /local/home/zhujiaxi/OpenSearch-Dashboards/target/NAME-1.3.0-ARCH.TYPE -s dir --name opensearch-dashboards --description Explore and visualize your OpenSearch data --version 1.3.0 --url https://opensearch.org --vendor OpenSearch --maintainer OpenSearch Dashboards Team <[email protected]> --license ASL 2.0 --conflicts opensearch-dashboards --after-install /local/home/zhujiaxi/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/package_scripts/post_install.sh --before-install /local/home/zhujiaxi/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/package_scripts/pre_install.sh --before-remove /local/home/zhujiaxi/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/package_scripts/pre_remove.sh --after-remove /local/home/zhujiaxi/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/package_scripts/post_remove.sh --config-files /etc/opensearch-dashboards/opensearch_dashboards.yml --template-value user=opensearch-dashboards --template-value group=opensearch-dashboards --template-value optimizeDir=/usr/share/opensearch-dashboards/optimize --template-value configDir=/etc/opensearch-dashboards --template-value pluginsDir=/usr/share/opensearch-dashboards/plugins --template-value dataDir=/var/lib/opensearch-dashboards --exclude usr/share/opensearch-dashboards/config --exclude usr/share/opensearch-dashboards/data --exclude usr/share/opensearch-dashboards/assets --architecture x64 --rpm-os linux /local/home/zhujiaxi/OpenSearch-Dashboards/build/opensearch-dashboards-1.3.0-linux-x64/=/usr/share/opensearch-dashboards/ /local/home/zhujiaxi/OpenSearch-Dashboards/build/opensearch-dashboards-1.3.0-linux-x64/config/=/etc/opensearch-dashboards/ /local/home/zhujiaxi/OpenSearch-Dashboards/build/opensearch-dashboards-1.3.0-linux-x64/data/=/var/lib/opensearch-dashboards/ /local/home/zhujiaxi/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/service_templates/sysv/=/ /local/home/zhujiaxi/OpenSearch-Dashboards/src/dev/build/tasks/os_packages/service_templates/systemd/=/
   │ info {:timestamp=>"2022-03-31T18:49:46.090570+0000", :message=>"Created package", :path=>"/local/home/zhujiaxi/OpenSearch-Dashboards/target/opensearch-dashboards-1.3.0-x64.rpm"}
   │ succ ✓ 34 sec

 info [  global  ] Writing sha1sums of archives and packages in target directory
   │ succ ✓ 0 sec

Done in 423.15s.

yarn build --rpm --skip-archives --release

@peterzhuamazon
Copy link
Member

So fpm did not export correctly in that container. Will PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants