-
Notifications
You must be signed in to change notification settings - Fork 0
Ctl switchover #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Latest release is incompatible with python < 3.9
- Postgresql._state - pg_isready state
Allow to define labels that will be assigned to a postgres instance pod when in 'initializing new cluster', 'running custom bootstrap script', 'starting after custom bootstrap', or 'creating replica' state
The previous version only worked before the click-8.2 token-normalization changes
| click.echo('Current cluster topology') | ||
| output_members(cluster, cluster_name, group=group) | ||
|
|
||
| if is_citus_cluster() and group is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Citus will be quite unhappy if some nodes don't have a local leader. Correct fix is probably to have a single point that determines which site is active for the whole cluster. But that is a larger job. I think for now we should just have an error saying that citus and multisite together is unsupported.
| # multisite_cluster = multisite_dcs.get_cluster() | ||
|
|
||
| candidate_names = [str(m.multisite['name']) for m in cluster.members | ||
| if m.multisite and m.multisite['name'] != leader_site] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should not work, the other sites members are not listed in this sites DCS. Meaning candidate_names will only contain the site name that this is executed on. This is only correct when executed on standby site in a 2 node cluster.
| switchover_value = {'candidate': candidate} | ||
|
|
||
| if scheduled_at_str: | ||
| switchover_value['scheduled_at'] = scheduled_at_str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value is ignored by the multisite code. Scheduled switchover is not yet implemented.
To implement
patronictl multisite-switchover? probably more sensible to call it
site-switchoverinstead?