Bug 1964041

Summary: Traceback "`/usr/share/foreman` is not writable." in terminal window of Red Hat Inventory page.
Product: Red Hat Satellite Reporter: Jameer Pathan <jpathan>
Component: RH Cloud - InventoryAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: apuntamb, aruzicka, chrobert, egolov
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:11:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Traceback bz_1964041 none

Description Jameer Pathan 2021-05-24 15:15:09 UTC
Description of problem:
Traceback "`/usr/share/foreman` is not writable." in terminal window of Red Hat Inventory page.

Version-Release number of selected component (if applicable):
- Satellite 6.10.0 snap 1
- tfm-rubygem-foreman_rh_cloud-3.0.20-1.el7sat.noarch

How reproducible:
- Always 

Steps to Reproduce:
1. Install Satellite 6.10.0 snap 1
2. Go to Configure > Inventory upload
3. Click on Default Organization tab

Actual results:
- Traceback related to "`/usr/share/foreman` is not writable."

Expected results:
- No traceback

Additional info:

Comment 1 Jameer Pathan 2021-05-24 15:17:21 UTC
Created attachment 1786479 [details]
Traceback bz_1964041

Comment 4 Evgeni Golov 2021-07-02 07:44:27 UTC
The interesting this is: when you go to the reproducer machine, and click "generate", it generates a report just fine and as a bonus you can't find the old error nowhere in the logs (all tasks related to inventory upload are either successful or failed for completely different reasons).

I am kinda sure this is not a delivery/rel-eng issue, but also not sure what else it could be.

Best guess would be that the job runs at a time where the bundle is "unclean", either because we're currently installing or upgrading a package?
But I have no idea why the job should run at all at that moment.

Comment 5 Shimon Shtein 2021-07-04 17:41:42 UTC
I see that although the message is reproducible, it does not interfere with the generation process.
I think it has something to do with the context in which the task runs.

As for the "unclean" bundle, is there a chance that the process has loaded some older versions and was upgraded while running?

Comment 6 Evgeni Golov 2021-07-05 07:21:00 UTC
This is a fresh install, so I'm going with "no" (but that doesn't make the explanation any easier)

Comment 7 Aditi Puntambekar 2021-08-10 07:21:09 UTC
@sshtein Hello, sure! I have asked @Chris to confirm if there is any issue while loading foreman_azure_rm based on the latest changes.

Comment 8 Chris Roberts 2021-08-10 13:33:23 UTC
@Aditi

Will look today and see what is going on

Comment 9 Chris Roberts 2021-08-10 15:48:52 UTC
I can't reach the box anymore in the private comment, i will test with the latest 6.10 snap and report back

Comment 10 Chris Roberts 2021-08-19 19:03:02 UTC
Sorry for the delay, had some things come up.

I tested this with snap 14

I do not see any trace backs following the steps provided:

'ErbParser' is ignored.

'RubyParser' is ignored.

I, [2021-08-19T14:51:41.482270 #29860] INFO -- : Started generating hosts report in /tmp/d20210819-29860-wqzsxw

I, [2021-08-19T14:51:41.499772 #29860] INFO -- : Report generation finished

I, [2021-08-19T14:51:41.499806 #29860] INFO -- : Archiving generated report

I, [2021-08-19T14:51:41.508282 #29860] INFO -- : tar: ./

./metadata.json

I, [2021-08-19T14:51:41.508361 #29860] INFO -- : Report archived successfully

Successfully generated /var/lib/foreman/red_hat_inventory/generated_reports/report_for_1.tar.xz for organization id 1

You can try yourself on the satellite I have running. I will post the info in a separate comment as private.

Comment 13 Jameer Pathan 2021-09-29 10:09:55 UTC
Verified

Verified with:
- Satellite 6.10.0 snap 20
- tfm-rubygem-foreman_rh_cloud-4.0.26-1.el7sat.noarch

Test steps:
1. Install Satellite 6.10.0 snap 20
2. Go to Configure > Inventory upload
3. Click on Default Organization tab

Observation:
- No traceback



'ErbParser' is ignored.

'RubyParser' is ignored.

I, [2021-09-29T06:08:23.756842 #34656] INFO -- : Started generating hosts report in /tmp/d20210929-34656-es4d5p

I, [2021-09-29T06:08:23.774104 #34656] INFO -- : Adding slice 6e1fe781-25cd-444d-be8b-f90fd8f554f1

I, [2021-09-29T06:08:24.858681 #34656] INFO -- : slice 6e1fe781-25cd-444d-be8b-f90fd8f554f1 was created with 1 hosts

I, [2021-09-29T06:08:24.858815 #34656] INFO -- : Report generation finished

I, [2021-09-29T06:08:24.858833 #34656] INFO -- : Archiving generated report

I, [2021-09-29T06:08:24.889784 #34656] INFO -- : tar: ./

./metadata.json

./6e1fe781-25cd-444d-be8b-f90fd8f554f1.json

I, [2021-09-29T06:08:24.890152 #34656] INFO -- : Report archived successfully

Successfully generated /var/lib/foreman/red_hat_inventory/generated_reports/report_for_1.tar.xz for organization id 1

Comment 16 errata-xmlrpc 2021-11-16 14:11:19 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