Task #11846
closedPostgreSQL data/conns handling on IPv6-only
0%
Description
Demonstrate a multi-node setup with
- Streaming replication
- WAL replication (repmgr + barman)
- remote backup (barman)
- VIP failover (keepalived || ip6.sh || v6-magic)
- PGpoolII
- pgbouncer
... and restore things (no v6 specials expected, hah).
Updated by Philipp (double-p) Buehler over 1 year ago
key for provisioning `ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINfdGn4eneqqp0AOXZqkQJzeLLy//FiGqYmWimuqIH6h pbuehler@adm042.local`
Updated by Philipp (double-p) Buehler over 1 year ago
need; 4 VMs. each:
1 vCPU, 4 GB RAM, 10 GB Disk. All v6-only in one prefix preferably?
Updated by Nico Schottelius over 1 year ago
[16:57] nb3:~% for v in 2a0a:e5c0:2:12:0:f0ff:fea9:c3d9 2a0a:e5c0:2:12:0:f0ff:fea9:c3e4 2a0a:e5c0:2:12:0:f0ff:fea9:c3ea 2a0a:e5c0:2:12:0:f0ff:fea9:c3ee; do ssh root@$v "echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINfdGn4eneqqp0AOXZqkQJzeLLy//FiGqYmWimuqIH6h pbuehler@adm042.local >> .ssh/authorized_keys" ; done Warning: Permanently added '2a0a:e5c0:2:12:0:f0ff:fea9:c3d9' (ED25519) to the list of known hosts. Warning: Permanently added '2a0a:e5c0:2:12:0:f0ff:fea9:c3e4' (ED25519) to the list of known hosts. Warning: Permanently added '2a0a:e5c0:2:12:0:f0ff:fea9:c3ea' (ED25519) to the list of known hosts. Warning: Permanently added '2a0a:e5c0:2:12:0:f0ff:fea9:c3ee' (ED25519) to the list of known hosts. [16:59] nb3:~%
Updated by Philipp (double-p) Buehler over 1 year ago
Nico Schottelius wrote in #note-3:
[...]
i think apt upgrade killed these three
Warning: Permanently added '2a0a:e5c0:2:12:0:f0ff:fea9:c3e4' (ED25519) to the list of known hosts.
Warning: Permanently added '2a0a:e5c0:2:12:0:f0ff:fea9:c3ea' (ED25519) to the list of known hosts.
Warning: Permanently added '2a0a:e5c0:2:12:0:f0ff:fea9:c3ee' (ED25519) to the list of known hosts.
since I tried to update grub only on vda1. could you respawn these - nothing done on them besides 'apt upgrade'.
Updated by Nico Schottelius over 1 year ago
for v in 2a0a:e5c0:2:12:0:f0ff:fea9:c3e4 2a0a:e5c0:2:12:0:f0ff:fea9:c3ea 2a0a:e5c0:2:12:0:f0ff:fea9:c3ee ; do ssh root@$v "echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINfdGn4eneqqp0AOXZqkQJzeLLy//FiGqYmWimuqIH6h pbuehler@adm042.local >> .ssh/authorized_keys" ; done
Updated by Philipp (double-p) Buehler over 1 year ago
code/pres in ze works
Updated by Philipp (double-p) Buehler over 1 year ago
sidenote: pgLoader does not support IPv6 in the connection strings (pgpass). so data has to be copied via scp/rsync/.. and then loaded locally (unix socket)
Updated by Philipp (double-p) Buehler over 1 year ago
postgres@pg1:~$ repmgr cluster show
ID | Name | Role | Status | Upstream | Location | Priority | Timeline | Connection string
----+------+---------+-----------+----------+----------+----------+----------+-----------------------------------------------
1 | pg1 | primary | * running | | default | 100 | 1 | host=pg1 user=repmgr dbname=repmgr port=5432
2 | pg2 | standby | running | pg1 | default | 100 | 1 | host=pg2 user=repmgr dbname=repmgr port=5432
3 | pg3 | standby | running | pg1 | default | 100 | 1 | host=pg3 user=repmgr dbname=repmgr port=5432
Updated by Philipp (double-p) Buehler over 1 year ago
postgres@pg2:~$ repmgr standby switchover --siblings-follow
NOTICE: executing switchover on node "pg2" (ID: 2)
NOTICE: attempting to pause repmgrd on 3 nodes
NOTICE: local node "pg2" (ID: 2) will be promoted to primary; current primary "pg1" (ID: 1) will be demoted to standby
NOTICE: stopping current primary node "pg1" (ID: 1)
NOTICE: issuing CHECKPOINT on node "pg1" (ID: 1)
DETAIL: executing server command "sudo systemctl stop postgresql"
INFO: checking for primary shutdown; 1 of 60 attempts ("shutdown_check_timeout")
INFO: checking for primary shutdown; 2 of 60 attempts ("shutdown_check_timeout")
NOTICE: current primary has been cleanly shut down at location 0/7071970
NOTICE: promoting standby to primary
DETAIL: promoting server "pg2" (ID: 2) using pg_promote()
NOTICE: waiting up to 60 seconds (parameter "promote_check_timeout") for promotion to complete
NOTICE: STANDBY PROMOTE successful
DETAIL: server "pg2" (ID: 2) was successfully promoted to primary
WARNING: node "pg1" attached in state "startup"
INFO: waiting for node "pg1" (ID: 1) to connect to new primary; 1 of max 60 attempts (parameter "node_rejoin_timeout")
DETAIL: node "pg2" (ID: 1) is currently attached to its upstream node in state "startup"
WARNING: node "pg1" attached in state "startup"
NOTICE: node "pg2" (ID: 2) promoted to primary, node "pg1" (ID: 1) demoted to standby
NOTICE: executing STANDBY FOLLOW on 1 of 1 siblings
INFO: STANDBY FOLLOW successfully executed on all reachable sibling nodes
NOTICE: switchover was successful
DETAIL: node "pg2" is now primary and node "pg1" is attached as standby
NOTICE: STANDBY SWITCHOVER has completed successfully