Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1136282 - `foreman-rake bootdisk:generate:generic` fails with: Permission denied - bootdisk_<fqdn>.iso
Summary: `foreman-rake bootdisk:generate:generic` fails with: Permission denied - boot...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Dominic Cleal
QA Contact: Tazim Kolhar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-02 09:33 UTC by Jan Hutař
Modified: 2017-02-23 21:00 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:15:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 7370 0 None None None 2016-04-22 16:58:32 UTC
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description Jan Hutař 2014-09-02 09:33:24 UTC
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


Actual results:
# 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

Comment 2 Jan Hutař 2014-09-02 09:35:21 UTC
Sorry, expected result (due to fact we are on Sat6 without any repos synced) should be some reasonable error message. ISO can not be generated because we do not have the content.

Comment 3 Lukas Zapletal 2014-09-02 13:21:38 UTC
I can confirm, this is because foreman-rake runs as "foreman" effective user. Unfortunately changing to /tmp does not help, it looks like it wants to create some kind of temporary file somewhere. We should respect the $PWD when copying the file.

Workaround:

[root@dell-pe2950-01 ~]# foreman-rake bootdisk:generate:generic OUTPUT=/tmp/my.iso
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)
Wrote /tmp/my.iso

Comment 4 Mike McCune 2014-09-02 19:19:33 UTC
WORKAROUND:

User should specify an output directory on where to write the ISO file where the foreman user has permission to write to. A good example of this is /tmp

Comment 5 Dominic Cleal 2014-09-08 07:40:56 UTC
Created redmine issue http://projects.theforeman.org/issues/7370 from this bug

Comment 6 Bryan Kearney 2014-10-03 12:05:49 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7370 has been closed
-------------
Dominic Cleal
Applied in changeset commit:foreman_bootdisk|c010a67fada33276da4dd9164d6580f16d476904.

Comment 9 Tazim Kolhar 2015-03-09 12:12:47 UTC
VERIFIED:

# 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: 290
Path table size(bytes): 10
Max brk space used 0
339 extents written (0 MB)
Wrote /tmp/bootdisk_2365076133.dom.com.iso

Comment 10 Bryan Kearney 2015-08-11 13:37:37 UTC
This bug is slated to be released with Satellite 6.1.

Comment 11 errata-xmlrpc 2015-08-12 05:15:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592


Note You need to log in before you can comment on or make changes to this bug.