-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add event stats output to the operator logs for Ansible based-operators. #2580
Add event stats output to the operator logs for Ansible based-operators. #2580
Conversation
/hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a question.
func printEventStats(statusEvent eventapi.StatusJobEvent) { | ||
fmt.Printf("\n--------------------------- Ansible Task Status Event StdOut -----------------\n") | ||
fmt.Println(statusEvent.StdOut) | ||
fmt.Printf("\n-------------------------------------------------------------------------------\n") | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm missing something but why do we use fmt.Printf
here but logger.
in other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To print the data formatted such as we do here: #2321. It has an image which shows the output as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, if you put the ansible stdout through the logger it gets mangled completely since it is JSON serialized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
In the long run we probably want to figure out how to better integrate the Ansible logs into the core logging facilities but I think this is an acceptable stopgap
…le logs on it (#2589) **Description of the change:** - Add full Ansible result output to the operator logs for Ansible based-operators configurable by EnvVar. **Motivation for the change:** Allow users to have the same full information that can be obtained until the version 0.15.x with the Ansible sidecar container in the operator logs. Note that we deprecated the inotify-tools and we will no longer scaffold the sidecar container. See #2586. Also, we have been improving the operator logs in order to attend all needs. See: #2580 and #2321.
Description
Add event stats output to the operator logs for Ansible based-operators.
Motivation
Allow we remove the ansible container ( Related to #2007 )