-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
6.18.0, 6.18.1, 6.18.2
-
None
-
False
-
sat-proton
-
None
-
None
-
None
-
None
It's not related to https://issues.redhat.com/browse/SAT-35473 as i am not expecting to use any env vars to specify any Org ID at all.
In Red Hat Satellite 6.17:
It executes fine but the generated report has no data for any orgs:
# foreman-rake rh_cloud_inventory:report:generate --trace Invoke rh_cloud_inventory:report:generate (first_time) Invoke environment (first_time) Execute environment W, 2026-01-13T18:09:23.476399 #1934651 WARN - : Scoped order is ignored, it's forced to be batch order. .. Execute rh_cloud_inventory:report:generate /usr/share/foreman is not writable by the current process Using /tmp/d20260113-1934651-mdy4ar for the output I, 2026-01-13T18:09:26.960688 #1934651 INFO - : Started generating hosts report in /tmp/d20260113-1934651-5qcbxl W, 2026-01-13T18:09:27.100552 #1934651 WARN - : Scoped order is ignored, it's forced to be batch order. I, 2026-01-13T18:09:27.102327 #1934651 INFO - : Report generation finished I, 2026-01-13T18:09:27.102429 #1934651 INFO - : Archiving generated report I, 2026-01-13T18:09:27.108897 #1934651 INFO - : tar: ./ ./metadata.json I, 2026-01-13T18:09:27.109296 #1934651 INFO - : Report archived successfully Successfully generated /tmp/d20260113-1934651-mdy4ar/report_for_.tar.xz for organization id
In Satellite 6.18, the behavior is this:
# foreman-rake rh_cloud_inventory:report:generate --trace
Invoke rh_cloud_inventory:report:generate (first_time)
Invoke environment (first_time)
Execute environment
W, 2026-01-13T18:06:11.622250 #107366 WARN - : Scoped order is ignored, it's forced to be batch order.
W, 2026-01-13T18:06:12.318123 #107366 WARN - : Scoped order is ignored, it's forced to be batch order.
..
Invoke dynflow:client (first_time)
Invoke environment
Execute dynflow:client
Execute rh_cloud_inventory:report:generate
/usr/share/foreman is not writable by the current process
Using /tmp/d20260113-107366-xzywps for the output
rake aborted!
ForemanTasks::TaskError: Task 51dd4973-1fd7-4719-b8b0-736b8c187af4: ActiveRecord::RecordNotFound: Couldn't find Organization without an ID
In both cases, if i do this
foreman-rake rh_cloud_inventory:report:generate organization_id=1 --trace
It works fine and generates a valid data and that is fine.
Observation:
- The task generate_upload is the only task designed to work for either all Orgs or else use the organization_id passed.
- The generate task is not designed to work for all Orgs at once. It only works when organization_id is explicitely passed.
- The rh_cloud_inventory:report:upload task does not work without any organization_id passed in both 6.18 and 6.17
- The same does not applies for the rh_cloud_inventory:sync task. Even if i don't pass the organization_id , it works for all orgs without any issues in both sat 6.18 and 6.17
- Description for each task does not mention anything about passing organization_id as a requirement.
Expectations:
1. Make every task behave in a consistent manner. Either put a hard requirement of passing organization_id to each of the tasks. Or else , design the tasks in a way that when organization_id is not passed, It loops through all the expected organizations.
2. Update description of each task so that they reflect their requirements. Right now, None of the descriptions mention the use of organization_id env var.
# foreman-rake -D rh_cloud_inventory:report:generate rake rh_cloud_inventory:report:generate Generate inventory report to be sent to Red Hat cloud rake rh_cloud_inventory:report:generate_upload Generate inventory report and send it to Red Hat cloud # foreman-rake -D rh_cloud_inventory:sync rake rh_cloud_inventory:sync Synchronize Hosts inventory