Skip to content

Commit

Permalink
[AAP EDA] Add new preset
Browse files Browse the repository at this point in the history
Adds a new preset for `aap_eda`, or Ansible Automation Platform Event
Driven Controller.

This preset will set the `containers_common` plugin to collect output
for the `eda` user.

Related: #3486

Signed-off-by: Jake Hunsaker <[email protected]>
  • Loading branch information
TurboTurtle committed Jan 23, 2024
1 parent cd98876 commit ab5f7ce
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sos/policies/distros/redhat.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from sos.report.plugins import RedHatPlugin
from sos.presets.redhat import (RHEL_PRESETS, RHV, RHEL, CB, RHOSP,
RHOCP, RH_CFME, RH_SATELLITE)
RHOCP, RH_CFME, RH_SATELLITE, AAPEDA)
from sos.policies.distros import LinuxPolicy, ENV_HOST_SYSROOT
from sos.policies.package_managers.rpm import RpmPackageManager
from sos.policies.package_managers.flatpak import FlatpakPackageManager
Expand Down Expand Up @@ -421,6 +421,10 @@ def probe_preset(self):
if self.pkg_by_name("ovirt-engine") is not None or \
self.pkg_by_name("vdsm") is not None:
return self.find_preset(RHV)
for pkg in ['automation-eda-controller',
'automation-eda-controller-server']:
if self.pkg_by_name(pkg) is not None:
return self.find_preset(AAPEDA)

# Vanilla RHEL is default
return self.find_preset(RHEL)
Expand Down
13 changes: 13 additions & 0 deletions sos/presets/redhat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@
RH_SATELLITE_DESC = "Red Hat Satellite"
SAT_OPTS = SoSOptions(log_size=100, plugopts=['apache.log=on'])

AAPEDA = 'aap_eda'
AAPEDA_DESC = 'Ansible Automation Platform Event Driven Controller'
AAPEDA_OPTS = SoSOptions(
enable_plugins=['containers_common'],
plugopts=[
'containers_common.rootlessusers=eda'
])
AAPEDA_NOTE = ('Collects \'eda\' user output for the containers_common plugin.'
' If you need more users, do not forget to add \'eda\' '
'to your own list for the \'rootlessusers\' option.')

CB = "cantboot"
CB_DESC = "For use when normal system startup fails"
CB_OPTS = SoSOptions(
Expand All @@ -66,6 +77,8 @@
NOTE_SIZE_TIME = "This preset may increase report size and run time"

RHEL_PRESETS = {
AAPEDA: PresetDefaults(name=AAPEDA, desc=AAPEDA_DESC, opts=AAPEDA_OPTS,
note=AAPEDA_NOTE),
RHV: PresetDefaults(name=RHV, desc=RHV_DESC, note=NOTE_TIME,
opts=_opts_verify),
RHEL: PresetDefaults(name=RHEL, desc=RHEL_DESC),
Expand Down

0 comments on commit ab5f7ce

Please sign in to comment.