ios-xr / gisobuild

Golden ISO build tool for ios-xr
Other
29 stars 13 forks source link

RuntimeError("Error CMD=%s returned --->%s" % (cmd, out)) #29

Closed P-Pusher closed 2 weeks ago

P-Pusher commented 1 year ago

Need some help with the GISO creation.

Have earlier successfully created GISO on WSL. But when i have installed a new virtual debian machine and trying to run the script i get a runtime error. Isn't the script checking in the wrong tmp-directory for the isis rpm?

sadada@server1:~$ sudo python3 /home/sadada/gisobuild/src/gisobuild.py --iso 5500_762_software/ncs5500-mini-x-7.6.2.iso --repo /home/sadada/5500_762_software/ --pkglist ncs5500-isis-2.1.0.0-r762.x86_64.rpm --label v1 System requirements check [PASS]

Platform: ncs5500 Version: 7.6.2

Scanning repository [/home/sadada/5500_762_software]...

Building RPM Database... Traceback (most recent call last): File "/home/sadada/gisobuild/src/gisobuild.py", line 532, in main() File "/home/sadada/gisobuild/src/gisobuild.py", line 528, in main execute_build(cli_args) File "/home/sadada/gisobuild/src/exrmod/isotools_exr.py", line 40, in execute_build system_build_main (cli_args, infile) File "/home/sadada/gisobuild/src/exrmod/gisobuild_exr.py", line 193, in main rpm_db.populate_rpmdb(fs_root, argv.rpmRepo, pkglist, File "/home/sadada/gisobuild/src/exrmod/gisobuild_exr_engine.py", line 748, in populate_rpmdb rpm.populate_mdata(fs_root, os.path.basename(file_name), File "/home/sadada/gisobuild/src/exrmod/gisobuild_exr_engine.py", line 321, in populate_mdata group_info = run_cmd("chroot "+fs_root+" rpm -qp --qf '%{GROUP}' "+rpm) File "/home/sadada/gisobuild/src/exrmod/gisobuild_exr_engine.py", line 114, in run_cmd raise RuntimeError("Error CMD=%s returned --->%s" % (cmd, out)) RuntimeError: Error CMD=chroot /home/sadada/output_gisobuild/tmp4xywesm2 rpm -qp --qf '%{GROUP}' ncs5500-isis-2.1.0.0-r762.x86_64.rpm returned --->

sadada@server1:~/output_gisobuild$ ls logs tmp9_y6q13q

root@server1:/home/sadada/output_gisobuild/tmp9_y6q13q# ls ncs5500-isis-2.1.0.0-r762.x86_64.rpm

sadada@server1:~/output_gisobuild/logs$ more gisobuild.log-2023-01-13:08:19:04.198732 2023-01-13 08:19:04:: Performing System requirements check... 2023-01-13 08:19:04:: Available space 25.50180435180664 GB 2023-01-13 08:19:04:: Required space 17.534122467041016 GB 2023-01-13 08:19:04:: System requirements check [PASS] 2023-01-13 08:19:52:: Golden ISO RPM_PATH: giso/ 2023-01-13 08:19:52:: Skipping the top level iso wrapper 2023-01-13 08:22:03:: ISO ncs5500-mini-x extract path /home/sadada/output_gisobuild/tmp106otls0 2023-01-13 08:22:03:: Iso top initrd path /home/sadada/output_gisobuild/tmp106otls0 2023-01-13 08:22:16:: Intermal System_image.iso /home/sadada/5500_762_software/ncs5500-mini-x-7.6.2.iso 2023-01-13 08:22:16:: Cleaning Iso 2023-01-13 08:22:16:: iso extract path /home/sadada/output_gisobuild/tmp106otls0 2023-01-13 08:23:02::
Found Bundle ISO: /home/sadada/5500_762_software/ncs5500-mini-x-7.6.2.iso 2023-01-13 08:23:02::
Platform: ncs5500 Version: 7.6.2 2023-01-13 08:25:55:: ISO ncs5500-mini-x extract path /home/sadada/output_gisobuild/tmp4xywesm2 2023-01-13 08:25:55::
Scanning repository [/home/sadada/5500_762_software]...

2023-01-13 08:25:55::
File list After Unification [['/home/sadada/5500_762_software/ncs5500-isis-2.1.0.0-r762.x86_64.rpm']]

2023-01-13 08:25:55:: Building RPM Database... 2023-01-13 08:25:56:: Cleaning Iso 2023-01-13 08:25:56:: iso extract path /home/sadada/output_gisobuild/tmp4xywesm2

pvpanda commented 1 year ago

Hi!

looks like you don't have chroot permission in your buildspace. You can do the following:

  1. Fix chroot support on your WSL ws.
  2. Install docker on your buildspace and use the '--docker' option while invoking the gisobuild command. (use --help for further info). refer: docker docs
  3. Lastly, use can use virtualbox + linux as your buildspace and try above two solutions there as well.

Thanks! -Tejeswar

P-Pusher commented 1 year ago

Hi,

My WSL installation is working fine and i'm able to create GISO on that one. The issue is on a standalone seperate vm Debian installation. I have tried the docker option there, but i got the same issue.

sadada@server1:/usr/local/gisobuild$ sudo python3 ./src/gisobuild.py --yamlfile 762_yaml_5500.yaml Setting up container environment... No matching image, pull new image \ Done...

Running GISO build... \Fatal error: GISO build 'docker run --name giso-1429c420d57c2651960b81ff -v /usr/local/gisobuild/src:/app/gisobuild:ro -v /usr/local/gisobuild/5500_762_software:/usr/local/gisobuild/5500_762_software:ro -v /usr/local/gisobuild/output_762_5500_giso/2c5kg8dl:/usr/local/gisobuild/output_762_5500_giso/2c5kg8dl:ro ciscogisobuild/cisco-xr-gisobuild:2.3.3 /app/gisobuild/gisobuild.py --yamlfile /usr/local/gisobuild/output_762_5500_giso/2c5kg8dl/cliConfig.yaml' failed with exit code 1 Traceback (most recent call last): File "/app/gisobuild/gisobuild.py", line 532, in main() File "/app/gisobuild/gisobuild.py", line 528, in main execute_build(cli_args) File "/app/gisobuild/exrmod/isotools_exr.py", line 40, in execute_build system_build_main (cli_args, infile) File "/app/gisobuild/exrmod/gisobuild_exr.py", line 197, in main giso.ExtendRpmRepository) File "/app/gisobuild/exrmod/gisobuild_exr_engine.py", line 749, in populate_rpmdb self.is_full_iso_require) File "/app/gisobuild/exrmod/gisobuild_exr_engine.py", line 321, in populate_mdata group_info = run_cmd("chroot "+fs_root+" rpm -qp --qf '%{GROUP}' "+rpm) File "/app/gisobuild/exrmod/gisobuild_exr_engine.py", line 114, in run_cmd raise RuntimeError("Error CMD=%s returned --->%s" % (cmd, out)) RuntimeError: Error CMD=chroot /tmp/output_gisobuild-rcr690ih/tmppry4zfr7 rpm -qp --qf '%{GROUP}' ncs5500-mgbl-3.0.0.0-r762.x86_64.rpm returned ---> Error: GISO build 'docker run --name giso-1429c420d57c2651960b81ff -v /usr/local/gisobuild/src:/app/gisobuild:ro -v /usr/local/gisobuild/5500_762_software:/usr/local/gisobuild/5500_762_software:ro -v /usr/local/gisobuild/output_762_5500_giso/2c5kg8dl:/usr/local/gisobuild/output_762_5500_giso/2c5kg8dl:ro ciscogisobuild/cisco-xr-gisobuild:2.3.3 /app/gisobuild/gisobuild.py --yamlfile /usr/local/gisobuild/output_762_5500_giso/2c5kg8dl/cliConfig.yaml' failed with exit code 1 Error: Traceback (most recent call last): Error: File "/app/gisobuild/gisobuild.py", line 532, in Error: main() Error: File "/app/gisobuild/gisobuild.py", line 528, in main Error: execute_build(cli_args) Error: File "/app/gisobuild/exrmod/isotools_exr.py", line 40, in execute_build Error: system_build_main (cli_args, infile) Error: File "/app/gisobuild/exrmod/gisobuild_exr.py", line 197, in main Error: giso.ExtendRpmRepository) Error: File "/app/gisobuild/exrmod/gisobuild_exr_engine.py", line 749, in populate_rpmdb Error: self.is_full_iso_require) Error: File "/app/gisobuild/exrmod/gisobuild_exr_engine.py", line 321, in populate_mdata Error: group_info = run_cmd("chroot "+fs_root+" rpm -qp --qf '%{GROUP}' "+rpm) Error: File "/app/gisobuild/exrmod/gisobuild_exr_engine.py", line 114, in run_cmd Error: raise RuntimeError("Error CMD=%s returned --->%s" % (cmd, out)) Error: RuntimeError: Error CMD=chroot /tmp/output_gisobuild-rcr690ih/tmppry4zfr7 rpm -qp --qf '%{GROUP}' ncs5500-mgbl-3.0.0.0-r762.x86_64.rpm returned --->

Done...

But i guess there must be something wrong with this debian-installation.

P-Pusher commented 2 weeks ago

Debian reinstall