Bug 2043103

Summary: foreman plugin to collect decoded dynflow data for dynflow>1.6
Product: Red Hat Enterprise Linux 7 Reporter: Pavel Moravec <pmoravec>
Component: sosAssignee: Barbora Vassova <bvassova>
Status: CLOSED ERRATA QA Contact: Upgrades and Supportability <upgrades-and-supportability>
Severity: high Docs Contact:
Priority: high    
Version: 7.9CC: agk, bmr, fkrska, jjansky, mhradile, plambri, pmoravec, sbradley, theute
Target Milestone: rcKeywords: OtherQA
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-28 09:52:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Moravec 2022-01-20 16:00:31 UTC
This bug was initially created as a copy of Bug #2043102

I am copying this bug because: 

Sat7.0 will run on RHEL7.9 as well.


Description of problem:
See related https://bugzilla.redhat.com/show_bug.cgi?id=2043097 .

Foreman plugin must collect dynflow psql CSV dumps such that:
- if tfm-rubygem-dynflow package < 1.6, collect as now
- if tfm-rubygem-dynflow >= 1.6, call the tool from bz2043097 with appropriate arguments.

This needs to go to 8.6 GA / 7.9.z to be released together with Sat7.0.


Version-Release number of selected component (if applicable):
sos-4.2-11


How reproducible:
100%


Steps to Reproduce:
1. Call "sosreport -o foreman --batch --build" on Sat7.0 and check sos_commands/foreman/dynflow* tables
2. Call the same sosreport command on Sat6.


Actual results:
1. CSV dump of the tables is encoded like:
72fd2b82-2b87-4179-95e2-3ccd0aa2b4ba,1,,,ForemanInventoryUpload::Async::GenerateAllReportsJob,1,,,,\x85b263757272656e745f726571756573745f6964d92465333333323538632d373730612d346562662d393665322d656532313535393264313935b063757272656e745f74696d657a6f6e65a3555443b763757272656e745f6f7267616e697a6174696f6e5f6964c0b363757272656e745f6c6f636174696f6e5f6964c0af63757272656e745f757365725f696401,
2. sosreport collects human readable CSV output.


Expected results:
1.+2. Human readable output collected both on Sat7.0 and Sat6


Additional info:

Comment 2 Pavel Moravec 2022-04-06 12:36:34 UTC
Granting RHEL 7.9.z as lack of foreman tasks data in sosreport is essential problem for debugging Satellite tasks related issues since 6.11 (also on RHEL7).

Comment 3 Pavel Moravec 2022-04-06 12:39:43 UTC
.. and I can verify the fix by myself.

Comment 11 Pavel Moravec 2022-06-14 12:27:08 UTC
Successfully tested against Sat6.11 beta (with dynflow-utils-1.6.3-1.el7sat.x86_64)

old behaviour:
==============
# rpm -q sos
sos-3.9-5.el7_9.10.noarch
#
# sosreport -o foreman --batch --build
..
Your sosreport build tree has been generated in:
  /var/tmp/sosreport-my-satellite611-2022-06-14-xjhvhlj


#
# head /var/tmp/sosreport-my-satellite611-2022-06-14-xjhvhlj/sos_commands/foreman/dynflow_actions 
execution_plan_uuid,id,caller_execution_plan_id,caller_action_id,class,plan_step_id,run_step_id,finalize_step_id,data,input,output
a026797c-5bf1-4642-818e-cf42a1bd845d,1,,,InventorySync::Async::InventoryScheduledSync,1,,,,\x85b263757272656e745f726571756573745f6964d92464393331633766382d333063312d346339632d616565632d656161343433306634383030b063757272656e745f74696d657a6f6e65a3555443b763757272656e745f6f7267616e697a6174696f6e5f6964c0b363757272656e745f6c6f636174696f6e5f6964c0af63757272656e745f757365725f696401,
53dbd4ac-0db2-4f81-98e5-d855bde56b69,4,,3,ForemanInventoryUpload::Async::UploadReportJob,6,7,,,\x88a866696c656e616d6585a5636c617373d92744796e666c6f773a3a457865637574696f6e506c616e3a3a4f75747075745265666572656e6365b1657865637574696f6e5f706c616e5f6964d92435336462643461632d306462322d346638312d393865352d643835356264653536623639a7737465705f696405a9616374696f6e5f696403a77375626b65797391b2656e7175657565645f66696c655f6e616d65af6f7267616e697a6174696f6e5f696401ae696e7374616e63655f6c6162656cac75706c6f61645f666f725f31b263757272656e745f726571756573745f6964d92462653031646530362d626335612d346330322d613432612d613666646161306136346435b063757272656e745f74696d657a6f6e65a3555443b763757272656e745f6f7267616e697a6174696f6e5f6964c0b363757272656e745f6c6f636174696f6e5f6964c0af63757272656e745f757365725f696401,



new behaviour:
==============
# rpm -q sos
sos-3.9-5.el7_9.11.noarch
#
# sosreport -o foreman --batch --build
..
Your sosreport build tree has been generated in:
  /var/tmp/sosreport-my-satellite611-2022-06-14-mdsejeu



#
# head /var/tmp/sosreport-my-satellite611-2022-06-14-mdsejeu/sos_commands/foreman/dynflow_actions 
execution_plan_uuid,id,caller_execution_plan_id,caller_action_id,class,plan_step_id,run_step_id,finalize_step_id,data,input,output
a026797c-5bf1-4642-818e-cf42a1bd845d,1,,,InventorySync::Async::InventoryScheduledSync,1,,,,"{""current_location_id"":null,""current_organization_id"":null,""current_request_id"":""d931c7f8-30c1-4c9c-aeec-eaa4430f4800"",""current_timezone"":""UTC"",""current_user_id"":1}",
53dbd4ac-0db2-4f81-98e5-d855bde56b69,4,,3,ForemanInventoryUpload::Async::UploadReportJob,6,7,,,"{""current_location_id"":null,""current_organization_id"":null,""current_request_id"":""be01de06-bc5a-4c02-a42a-a6fdaa0a64d5"",""current_timezone"":""UTC"",""current_user_id"":1,""filename"":{""action_id"":3,""class"":""Dynflow::ExecutionPlan::OutputReference"",""execution_plan_id"":""53dbd4ac-0db2-4f81-98e5-d855bde56b69"",""step_id"":5,""subkeys"":[""enqueued_file_name""]},""instance_label"":""upload_for_1"",""organization_id"":1}",
..

Comment 16 errata-xmlrpc 2022-06-28 09:52:21 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 (sos bug fix and enhancement update), 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/RHBA-2022:5226