Open el-pako opened 1 year ago
Does any of the information in https://sdk.operatorframework.io/docs/building-operators/ansible/reference/advanced_options/#using-ansible-log-events help?
If not, I think it seems reasonable that if the ansible-runner doesn't provide an environment variable for omitting the event data that we add a check for an env var that we would append the --omit-event-data
flag to it.
None of this influences the creation of job events. The only thing that helps is reducing the overall number of artifacts using maxRunnerArtifacts, but this would also affect the collection of other files like stdout, stderr, etc.
Having default maxRunnerArtifacts of 20, the job events alone add up to > 1GB in the filesystem of our Ansible operator based pods, which consumes memory. It would be really helpful to be able to set the env var as you suggested.
Adding the kind/feature
label and removing the milestone so that this show up in our next issue triage meeting.
The feature to be added is the ability to specify that the --omit-job-events
flag should be appended to the set of flags passed to the ansible runner around https://github.com/operator-framework/operator-sdk/blob/v1.28.x/internal/ansible/runner/runner.go#L98
I'm also going to unassign myself from this issue as I likely won't have the bandwidth to implement this myself. I'm happy to be a point of contact for these changes and review any PRs
@el-pako: The label(s) language/ansible
cannot be applied, because the repository doesn't have them.
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Type of question
General operator-related help
Question
I am trying to find any way for Ansible operator to stop generating job events (*.json) in artifacts directory for each run, but keep writing stdout, stderr, etc.
Ansible runner executable provides flag --omit-event-data, but it seems Ansible operator code passes a fixed list of flags when calling the runner: https://github.com/operator-framework/operator-sdk/blob/v1.28.x/internal/ansible/runner/runner.go#L98
The awx display plugin, reads environment variable RUNNER_OMIT_EVENTS, but setting this to true before calling ansible-operator did not have the desired effect.
Operator type:
/language ansible
Kubernetes cluster type:
Openshift