controller_configuration icon indicating copy to clipboard operation
controller_configuration copied to clipboard

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

Open mhjacks opened this issue 5 months ago • 1 comments

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.

mhjacks avatar Aug 14 '25 17:08 mhjacks

I need to relook into this, I think there might be some changes coming to the EDA modules and in that case maybe this could be addressed there. if not we will need to add the logic to the role itself.

djdanielsson avatar Nov 19 '25 16:11 djdanielsson