hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.1k stars 115 forks source link

pg_autoctl disable maintenance twice #987

Open Tiago-Anastacio opened 1 year ago

Tiago-Anastacio commented 1 year ago

Salut Dimitri,

I try to raise twice ( on a healthy cluster) pg_autoctl enable maintenance, return code is 0 (event if the second time I have the message Node already in ... maintenance). To me that's logical.

I tried same test with pg_autoctl disable maintenance, the second try I have return code 6 (and the message Monitor ERROR: cannot stop maintenance when current state for node 1 "node_1" is not "maintenance"

My question is, is return code 6 specific to that state , or I can have code return code 6 (for pg_autoctl disable maintenance statement) in other uses cases ? If yes how can I handle that case which to me is not an error ?

Thank you

Tiago-Anastacio commented 1 year ago

Salut Dimitri,

could you have some time to take a look at that ?

Merci