Skip to content

Add ingnore_errors: true for Search and Configure priv commands on base/audit role #1080

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

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

Persimmonboy
Copy link
Contributor

@Persimmonboy Persimmonboy commented Aug 7, 2024

Added the ignore_errors: true parameter to Ansible tasks to prevent interruptions caused by errors when searching for and logging privileged commands on base/audit role for infra-prod-base-ext zuul job.

These changes allow the playbook to continue execution even if some commands return errors related to non-existent container binaries. Examples of such errors include:

fatal: [executor4.apimon.eco.tsi-dev.otc-service.com]: FAILED! => {
"changed": false,
"cmd": "df --local -P | awk {'if (NR!=1) print $6'}  \\\n| xargs -I '{}' find '{}' -xdev -type f \\( -perm -4000 -o -perm -2000 \\) -print 2>/dev/null\n",
"delta": "0:00:01.915619",
"end": "2024-08-06 08:03:51.166100",
"rc": 123,
"start": "2024-08-06 08:03:49.250481"
}
failed: [graphite1.eco.tsi-dev.otc-service.com] (item=/var/lib/containers/storage/overlay/814bff7343242acfd20a2c841e041dd57c50f0cf844d4abd2329f78b992197f4/diff/sbin/unix_chkpwd) => {
"ansible_loop_var": "item",
"changed": false,
"item": "/var/lib/containers/storage/overlay/814bff7343242acfd20a2c841e041dd57c50f0cf844d4abd2329f78b992197f4/diff/sbin/unix_chkpwd",
"rc": -13
}

These errors occurred sporadically on various hosts, often due to attempts to access binaries from non-existent containers. Adding ignore_errors: true helps ensure the playbook runs more reliably by ignoring such transient errors.

@Persimmonboy Persimmonboy added the gate Merge PR label Aug 8, 2024
Copy link

otc-zuul bot commented Aug 8, 2024

Build succeeded.
https://zuul.otc-service.com/t/eco/buildset/f763ac6265d0418d9ee71cafc59ba761

✔️ otc-tox-docs SUCCESS in 4m 30s
✔️ otc-tox-linters SUCCESS in 3m 07s
✔️ system-config-run-base SUCCESS in 5m 18s

@otc-zuul otc-zuul bot merged commit 92f805f into main Aug 8, 2024
2 checks passed
@otc-zuul otc-zuul bot deleted the fix-audit-role-for-infra-prod-base-job branch August 8, 2024 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gate Merge PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants