Skip to content

The eda_rulebook_activations role needs to be prepared to deal with API errors when changing rulebook configurations #1146

@mhjacks

Description

@mhjacks

The ansible.eda collection was recently patched to no throw errors when re-applying the same configuration for a runing rulebook activation. However, it is still considered an error to change a running rulebook activation. This role needs to be able to process this situation to prevent unexpected errors from invocations of this role or the dispatch role that might aggregate it.

Describe the solution you'd like
I see two options: a new parameter to the role to indicate how to handle a running rulebook situation. In one case, we can allow for changing a running rulebook, which would stop it and then manage it (and presumably that would result in it restarting if desired). The other option is to allow an existing running rulebook to continue running as configured; in such a case the role should pass it by.

Describe alternatives you've considered
This is a workaround that I am using in AGOF right now: https://github.com/validatedpatterns/agof/blob/main/agof_configure_aap/roles/pre_config_fixups/tasks/rulebook_activations.yml. This retrieves existing rulebook configs, looks for the intersection with ones to manage, and stops the ones the config intends to manage. A different generalized approach is probably needed.

Additional context
This is a follow-on to internal discussions that have happened as part of https://issues.redhat.com/browse/AAP-49877. As of filing the engineering team has a feature in backlog that will address this, but the delivery of that feature is not set and this will be an issue for the foreseeable future in AAP 2.5 and 2.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions