Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1817489

Summary: "Path doesn't exist: /var/lib/foreman/red_hat_inventory/uploads/report_for_1.tar.gz" when downloading report
Product: Red Hat Satellite Reporter: Mirek Długosz <mzalewsk>
Component: RH Cloud - InventoryAssignee: Shimon Shtein <sshtein>
Status: CLOSED DUPLICATE QA Contact: Mirek Długosz <mzalewsk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0Keywords: Triaged
Target Milestone: 6.8.0   
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: 2020-04-27 12:12:12 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
Screenshot showing problem none

Description Mirek Długosz 2020-03-26 12:46:23 UTC
Created attachment 1673773 [details]
Screenshot showing problem

Sometimes when I click "Download report", I get error: "Path doesn't exist: /var/lib/foreman/red_hat_inventory/uploads/report_for_1.tar.gz".

Here's directory structure on Satellite right after I triggered the issue:

#v+
[root@dhcp-2-223 ~]# ls /var/lib/foreman/red_hat_inventory/uploads/report_for_1.tar.gz
ls: cannot access /var/lib/foreman/red_hat_inventory/uploads/report_for_1.tar.gz: No such file or directory
[root@dhcp-2-223 ~]# ls -lahR /var/lib/foreman/red_hat_inventory/
/var/lib/foreman/red_hat_inventory/:
total 0
drwxr-xr-x. 5 foreman foreman  61 Mar 25 06:56 .
drwxr-xr-x. 6 foreman foreman  66 Mar 25 05:39 ..
drwxr-xr-x. 2 foreman foreman   6 Mar 26 06:12 generated_reports
drwxr-xr-x. 2 foreman foreman 159 Mar 26 06:12 outputs
drwxr-xr-x. 3 foreman foreman  37 Mar 26 06:12 uploads

/var/lib/foreman/red_hat_inventory/generated_reports:
total 0
drwxr-xr-x. 2 foreman foreman  6 Mar 26 06:12 .
drwxr-xr-x. 5 foreman foreman 61 Mar 25 06:56 ..

/var/lib/foreman/red_hat_inventory/outputs:
total 24K
drwxr-xr-x. 2 foreman foreman  159 Mar 26 06:12 .
drwxr-xr-x. 5 foreman foreman   61 Mar 25 06:56 ..
-rw-r--r--. 1 foreman foreman  747 Mar 26 06:12 report_for_1.out
-rw-------. 1 foreman foreman   16 Mar 26 06:12 report_for_1.status
-rw-r--r--. 1 foreman foreman  591 Mar 25 09:33 report_for_3.out
-rw-------. 1 foreman foreman   16 Mar 25 09:33 report_for_3.status
-rw-r--r--. 1 foreman foreman 2.2K Mar 26 06:12 upload_for_1.out
-rw-------. 1 foreman foreman   16 Mar 26 06:12 upload_for_1.status

/var/lib/foreman/red_hat_inventory/uploads:
total 4.0K
drwxr-xr-x. 3 foreman foreman  37 Mar 26 06:12 .
drwxr-xr-x. 5 foreman foreman  61 Mar 25 06:56 ..
drwx------. 2 foreman foreman 103 Mar 26 06:12 done
-rwxr-xr-x. 1 foreman foreman 940 Mar 25 10:11 uploader.sh

/var/lib/foreman/red_hat_inventory/uploads/done:
total 44K
drwx------. 2 foreman foreman 103 Mar 26 06:12 .
drwxr-xr-x. 3 foreman foreman  37 Mar 26 06:12 ..
-rw-r--r--. 1 foreman foreman 19K Mar 25 11:01 ff45bb65-e965-4ddd-a05d-86059aa13185.json
-rw-r--r--. 1 foreman foreman 190 Mar 25 11:01 metadata.json
-rw-r--r--. 1 foreman foreman 20K Mar 26 06:12 report_for_1.tar.gz
#v-

Indeed, report package is not in:
/var/lib/foreman/red_hat_inventory/uploads/report_for_1.tar.gz
but in:
/var/lib/foreman/red_hat_inventory/uploads/done/report_for_1.tar.gz


Here's log from "Uploading" tab console:
#v+
* About to connect() to cert.cloud.redhat.com port 443 (#0)

* Trying 96.17.221.248...

* Connected to cert.cloud.redhat.com (96.17.221.248) port 443 (#0)

* Initializing NSS with certpath: sql:/etc/pki/nssdb

* skipping SSL peer certificate verification

* NSS: client certificate from file

* subject: CN=<redacted>

* start date: Mar 25 13:00:17 2020 GMT

* expire date: Mar 25 14:00:17 2021 GMT

* common name: <redacted>

* issuer: E=ca-support,CN=Red Hat Candlepin Authority,OU=Red Hat Network,O="Red Hat, Inc.",ST=North Carolina,C=US

* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

* Server certificate:

* subject: CN=cloud.redhat.com,O="Red Hat, Inc.",L=Raleigh,ST=North Carolina,C=US

* start date: Apr 08 00:00:00 2019 GMT

* expire date: Apr 07 12:00:00 2020 GMT

* common name: cloud.redhat.com

* issuer: CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US

> POST /api/ingress/v1/upload HTTP/1.1

> User-Agent: curl/7.29.0

> Host: cert.cloud.redhat.com

> Accept: */*

> Content-Length: 6493

> Expect: 100-continue

> Content-Type: multipart/form-data; boundary=----------------------------121ed208a846

>

< HTTP/1.1 100 Continue

} [data not shown]

# 2.7% ####################################################################### 99.3% ######################################################################## 100.0%< HTTP/1.1 202 Accepted

< Server: openresty/1.13.6.1

< Content-Type: text/plain

< Content-Length: 0

< x-rh-insights-request-id: <redacted>

< X-Rh-Insights-Request-Id: <redacted>

< X-Content-Type-Options: nosniff

< Date: Thu, 26 Mar 2020 12:24:22 GMT

< Connection: keep-alive

< Set-Cookie: <redacted>; path=/; HttpOnly; Secure

<

* Connection #0 to host cert.cloud.redhat.com left intact

Done: /var/lib/foreman/red_hat_inventory/uploads/report_for_1.tar.gz

Uploaded files moved to done/ folder
#v-


I'm not exactly sure what causes this issue to appear, as earlier today I could download report. Back then, console said that connection with cloud.rh.com could not be authorized and report was not sent. So perhaps this button is working only when report failed to upload?


Tested on plugin version 1.0.4, Satellite 6.7 snap 17.