Back to bug 2232231

Who When What Removed Added
Red Hat Bugzilla 2023-08-15 20:45:19 UTC Pool ID sst_system_roles_rhel_9
Red Hat One Jira (issues.redhat.com) 2023-08-15 20:49:02 UTC Link ID Red Hat Issue Tracker RHELPLAN-165873
Rich Megginson 2023-08-15 21:04:50 UTC Flags needinfo?(briasmit)
Brian Smith 2023-08-15 21:42:07 UTC Flags needinfo?(briasmit)
Rich Megginson 2023-08-15 22:56:20 UTC Target Release --- 9.3
Whiteboard role:kdump
Status NEW ASSIGNED
Flags needinfo?(briasmit)
Link ID Github linux-system-roles/kdump/pull/161
Doc Type If docs needed, set a value Bug Fix
RHEL Program Management 2023-08-15 22:56:32 UTC Keywords Triaged
Rich Megginson 2023-08-15 22:57:13 UTC Doc Text Cause: The evaluation of `__kdump_authorized_keys is defined` was happening
after the evaluation of `(__kdump_authorized_keys.content ...)`. I guess
the parentheses cause the evaluation to happen first, regardless of the
`if` conditional.

Consequence: If authorized_keys were not found, the role would attempt to
evaluate the undefined `__kdump_authorized_keys` and fail.

Fix: Use the `defined` filter `d` with `__kdump_authorized_keys` to define
the value as an empty line, and omit the `if` clause.

Result: The role does not fail if authorized_keys are missing.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
Rich Megginson 2023-08-16 14:15:30 UTC Status ASSIGNED POST
Rich Megginson 2023-08-16 16:02:26 UTC Flags needinfo?(djez)
CC djez
Rich Megginson 2023-08-16 16:04:22 UTC Blocks 2232392
Rich Megginson 2023-08-16 17:39:23 UTC Flags needinfo?(jharuda) needinfo?(vdanek)
CC jharuda, vdanek
Brian Smith 2023-08-16 19:25:04 UTC CC rmeggins
Flags needinfo?(briasmit) needinfo?(rmeggins)
Rich Megginson 2023-08-17 00:18:55 UTC Flags needinfo?(rmeggins)

Back to bug 2232231