Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-39115

Running the Lightspeed inventory report rake task via CLI fails to write the report to the file system

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • stream, 6.18.0
    • RH Cloud
    • False
    • Proton Refinement Backlog
    • sat-proton
    • None
    • None
    • None
    • None

      When attempting to generate a Lighspeed inventory report via the foreman-rake CLI, the tar command that creates the report archive fails to write the report to the file system.

      How reproducible:

      100% 

      Is this issue a regression from an earlier version:

      No

      Steps to Reproduce:

      1. Deploy a Satellite and enable IOP.

      2. Register a host to the Satellite and setup Lightspeed.

      3. On the Satellite, run 'foreman-rake rh_cloud_inventory:report:generate'.

      Actual behavior:

      The rake task appears to finish without displaying an error:

       

      # foreman-rake rh_cloud_inventory:report:generate
      /usr/share/foreman is not writable by the current process
      Using /tmp/d20251008-83902-a1kksl for the output
      Check the Uploading tab for report uploading status.
      

      However, the report is not present in the directory indicated in the output, and production.log shows that tar failed to write the report:

      2025-10-08T12:28:24 [I|bac|119e72c9] Task {label: ForemanInventoryUpload::Async::GenerateReportJob, id: 9fa4061b-8560-40ea-a2f1-f8b00719ccda, execution_plan_id: ac64c4c7-6889-47a4-8548-8f8c5e083ccd} state changed: stopped  result: error
      2025-10-08T12:29:23 [I|app|] Rails cache backend: Redis
      2025-10-08T12:29:28 [W|app|] You are trying to replace import_subnets from . Adding allowed actions from plugin permissions to the existing one.
      2025-10-08T12:29:29 [W|app|] You are trying to replace view_hosts from foreman_ansible. Adding allowed actions from plugin permissions to the existing one.
      2025-10-08T12:29:29 [W|app|] You are trying to replace view_hostgroups from foreman_ansible. Adding allowed actions from plugin permissions to the existing one.
      2025-10-08T12:29:29 [W|app|] You are trying to replace edit_hosts from foreman_ansible. Adding allowed actions from plugin permissions to the existing one.
      2025-10-08T12:29:29 [W|app|] You are trying to replace edit_hostgroups from foreman_ansible. Adding allowed actions from plugin permissions to the existing one.
      2025-10-08T12:29:29 [W|app|] You are trying to replace view_job_invocations from foreman_leapp. Adding allowed actions from plugin permissions to the existing one.
      2025-10-08T12:29:29 [W|app|] You are trying to replace edit_hosts from foreman_openscap. Adding allowed actions from plugin permissions to the existing one.
      2025-10-08T12:29:29 [W|app|] You are trying to replace view_hosts from foreman_openscap. Adding allowed actions from plugin permissions to the existing one.
      2025-10-08T12:29:29 [W|app|] You are trying to replace edit_hostgroups from foreman_openscap. Adding allowed actions from plugin permissions to the existing one.
      2025-10-08T12:29:30 [W|app|] You are trying to replace view_smart_proxies from katello. Adding allowed actions from plugin permissions to the existing one.
      2025-10-08T12:29:33 [W|app|] ignoring associations organization_ids, location_ids audit definition for ForemanOpenscap::ArfReport, the resource is not audited
      2025-10-08T12:29:36 [I|bac|] Task {label: , execution_plan_id: 55625412-ad27-49c9-9d18-c1f976a82bdd} state changed: pending 
      2025-10-08T12:29:36 [I|bac|] Task {label: ForemanInventoryUpload::Async::HostInventoryReportJob, id: ffd7943c-0de8-41fa-8078-cf3a9788ad1b, execution_plan_id: 55625412-ad27-49c9-9d18-c1f976a82bdd} state changed: planning 
      2025-10-08T12:29:36 [I|bac|] Task {label: ForemanInventoryUpload::Async::HostInventoryReportJob, id: ffd7943c-0de8-41fa-8078-cf3a9788ad1b, execution_plan_id: 55625412-ad27-49c9-9d18-c1f976a82bdd} state changed: planned 
      2025-10-08T12:29:36 [I|bac|] Task {label: ForemanInventoryUpload::Async::HostInventoryReportJob, id: ffd7943c-0de8-41fa-8078-cf3a9788ad1b, execution_plan_id: 55625412-ad27-49c9-9d18-c1f976a82bdd} state changed: running 
      2025-10-08T12:29:36 [I|app|] Started generating hosts report in /tmp/d20251008-83232-b6aip9
      2025-10-08T12:29:36 [W|app|] Scoped order is ignored, it's forced to be batch order.
      2025-10-08T12:29:36 [I|app|] Adding slice 8f8a0546-7544-45c0-99f2-f00281a139c6
      2025-10-08T12:29:36 [I|app|] slice 8f8a0546-7544-45c0-99f2-f00281a139c6 was created with 1 hosts
      2025-10-08T12:29:36 [I|app|] Report generation finished
      2025-10-08T12:29:36 [I|app|] Archiving generated report
      2025-10-08T12:29:36 [I|app|] tar: tar (child): /tmp/d20251008-83902-a1kksl/report_for_1.tar.xz: Cannot open: No such file or directory
       | tar (child): Error is not recoverable: exiting now
       | ./
       | ./metadata.json
       | ./8f8a0546-7544-45c0-99f2-f00281a139c6.json
       | tar: /tmp/d20251008-83902-a1kksl/report_for_1.tar.xz: Cannot write: Broken pipe
       | tar: Child returned status 2
       | tar: Error is not recoverable: exiting now
       | 
      2025-10-08T12:29:36 [I|app|] Tar command failed: pid 83954 exit 0
      2025-10-08T12:29:36 [W|app|] Scoped order is ignored, it's forced to be batch order.
      2025-10-08T12:29:36 [W|app|] Scoped order is ignored, it's forced to be batch order.
      2025-10-08T12:29:36 [I|app|] There were no missing Red Hat Lightspeed facets
      2025-10-08T12:29:36 [I|bac|] Task {label: ForemanInventoryUpload::Async::HostInventoryReportJob, id: ffd7943c-0de8-41fa-8078-cf3a9788ad1b, execution_plan_id: 55625412-ad27-49c9-9d18-c1f976a82bdd} state changed: stopped  result: success
      

      Expected behavior:

      The report is successfully written to the directory indicated in the output from the rake task.

              Unassigned Unassigned
              rhn-support-synkd Danny Synk
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: