Bug #7370
closed`foreman-rake bootdisk:generate:generic` fails with: Permission denied - bootdisk_<fqdn>.iso
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1136282
Description of problem:
`foreman-rake bootdisk:generate:generic` fails with: "Permission denied - bootdisk_<fqdn>.iso"
Version-Release number of selected component (if applicable):
Satellite-6.0.4-RHEL-6-20140829.0
How reproducible:
always
Steps to Reproduce:
1. Take an empty Satellite 6
2. foreman-rake bootdisk:generate:generic --trace
- foreman-rake bootdisk:generate:generic --trace
- Invoke bootdisk:generate:generic (first_time)
- Invoke environment (first_time)
- Execute environment
- Execute bootdisk:generate:generic
Size of boot image is 4 sectors -> No emulation
Total translation table size: 2048
Total rockridge attributes bytes: 0
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
339 extents written (0 MB)
rake aborted!
Permission denied - bootdisk_<fqdn>.iso
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:1371:in `initialize'
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:1371:in `open'
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:1371:in `block in copy_file'
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:1370:in `open'
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:1370:in `copy_file'
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:477:in `copy_file'
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:396:in `block in cp'
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:1515:in `block in fu_each_src_dest'
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:1531:in `fu_each_src_dest0'
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:1513:in `fu_each_src_dest'
/opt/rh/ruby193/root/usr/share/ruby/fileutils.rb:395:in `cp'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_bootdisk-2.0.6/lib/tasks/bootdisk.rake:21:in `block (4 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_bootdisk-2.0.6/app/services/bootdisk/iso_generator.rb:42:in `block in generate'
/opt/rh/ruby193/root/usr/share/ruby/tmpdir.rb:83:in `mktmpdir'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_bootdisk-2.0.6/app/services/bootdisk/iso_generator.rb:12:in `generate'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_bootdisk-2.0.6/lib/tasks/bootdisk.rake:19:in `block (3 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
Tasks: TOP => bootdisk:generate:generic
Expected results:
Usable ISO should be generated
Updated by Dominic Cleal over 10 years ago
Maybe change the foreman-rake script to pass in an environment variable such as ORIGINAL_PWD, but letting it still cd to ~foreman, then have bootdisk use the value of ORIGINAL_PWD if present.
However I'd prefer the use of hammer instead of the rake task.
Updated by Dominic Cleal over 10 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
- Target version set to 1.7.2
ORIGINAL_PWD isn't much help for a root user operating in ~ as foreman still won't have write access. Falling back to /tmp is about all we can do.
Preference should be given to the Hammer CLI instead of this rake task.
Updated by Dominic Cleal over 10 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_bootdisk|c010a67fada33276da4dd9164d6580f16d476904.