Bug 1972771 - foreman-rake rh_cloud_inventory:report:generate fails with Permission denied
Summary: foreman-rake rh_cloud_inventory:report:generate fails with Permission denied
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Inventory
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.10.0
Assignee: Shimon Shtein
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-16 15:16 UTC by James Jeffers
Modified: 2021-11-16 14:12 UTC (History)
5 users (show)

Fixed In Version: tfm-rubygem-foreman_rh_cloud-4.0.22
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1957129
Environment:
Last Closed: 2021-11-16 14:11:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:12:05 UTC

Comment 1 Jameer Pathan 2021-07-02 12:34:31 UTC
Verified:

Verified with:
- Satellite 6.10.0 snap 7
- tfm-rubygem-foreman_rh_cloud-4.0.22-1.el7sat.noarch

Test steps:
- Run "foreman-rake rh_cloud_inventory:report:generate organization_id=1 --trace"

Observation:
- archive/report generated successfully.
- rh_cloud_inventory:report:generate foreman-rake command uses /tmp directory for writing reports to.

[root@dhcp-2-51 ~]# foreman-rake rh_cloud_inventory:report:generate organization_id=1 --trace
`/usr/share/foreman` is not writable.
Bundler will use `/tmp/bundler20210702-27882-16kiszk27882' as your home directory temporarily.
'ErbParser' is ignored.
'RubyParser' is ignored.
** Invoke rh_cloud_inventory:report:generate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute rh_cloud_inventory:report:generate
/usr/share/foreman is not writable by the current process
Using /tmp/d20210702-27882-l0z9kq for the output
Must specify either portal_user or organization_id
I, [2021-07-02T07:33:32.522777 #27882]  INFO -- : Started generating hosts report in /tmp/d20210702-27882-1s6c7vd
I, [2021-07-02T07:33:32.584718 #27882]  INFO -- : Adding slice 40be92c8-8edc-4292-af41-742482ebb461
I, [2021-07-02T07:33:34.430796 #27882]  INFO -- : slice 40be92c8-8edc-4292-af41-742482ebb461 was created with 2 hosts
I, [2021-07-02T07:33:34.430964 #27882]  INFO -- : Report generation finished
I, [2021-07-02T07:33:34.431017 #27882]  INFO -- : Archiving generated report
I, [2021-07-02T07:33:34.457596 #27882]  INFO -- : tar: ./
./metadata.json
./40be92c8-8edc-4292-af41-742482ebb461.json

I, [2021-07-02T07:33:34.457919 #27882]  INFO -- : Report archived successfully
Successfully generated /tmp/d20210702-27882-l0z9kq/report_for_1.tar.xz for organization id 1
[root@dhcp-2-51 ~]# ll /tmp/d20210702-27882-l0z9kq/report_for_1.tar.xz
-rw-r--r--. 1 foreman foreman 5808 Jul  2 07:33 /tmp/d20210702-27882-l0z9kq/report_for_1.tar.xz

Comment 4 errata-xmlrpc 2021-11-16 14:11:58 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 (Moderate: Satellite 6.10 Release), 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-2021:4702


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