edb-ansible icon indicating copy to clipboard operation
edb-ansible copied to clipboard

manage_dbserver service handler fails when patroni is used

Open treenerd opened this issue 1 year ago • 3 comments

Hi edb community;

I have tested the patroni part a bit and realized that I got some issues within my playbooks when manage_dbserver handler tries to reload postgresql on a node. Because patroni creates the service like postgresql-{pg_version}-patroni and manage_dbserver uses the lookup for pg_service which doesn't recognize that patroni is configured on that node, the reload will point to the wron service on that node. So within the lookup plugin the information about patroni is completely missing.

I don't have that much experience yet with patroni, but it would be interessting how it is recommended to reload, restart nodes configured with patroni when the edb roles are used.

  • Is it suggested to do this manualy and ignore the failure of manage_dbserver in that cases?
  • Is any special configuration, attribute needed so that ansible does it the right way?
  • Or is it just a missing feature inside the lookup plugin?

I also think, that even if ansible reloads postgresql-12-patroni a manual step will be needed, because inside patroni it is just marked to be reloaded/restarted. So it has to be scheduled or triggered within patroni to make things really happen.

If it is welcome I can create a improvment of the lookup plugin and add functionality for patroni. I'm open for discussions.

Best Regards

treenerd avatar Mar 24 '23 09:03 treenerd