Unreleased
These notes describe the changes since v2.2.0 that have not yet been released. The Changelog summarizes them.
Overview
Upgrading from v2.2.0
init_server now writes its systemd settings to drop-in files under
/etc/systemd/ rather than editing the main configuration files there; see
Fixed. On a host deployed by an earlier release, the lines those
releases added stay where they are: RemoveIPC=no in
/etc/systemd/logind.conf, and with debug_pgedge, the ANSIBLE MANAGED
block in /etc/systemd/coredump.conf and DefaultLimitCORE in
/etc/systemd/system.conf. They set the same values as the drop-ins, so they
do no harm and can stay or be removed. The first run after upgrading creates
the drop-ins and restarts systemd-logind once.
Changes
Added
-
The new
update_softwarerole applies minor updates to a deployed cluster's software. Each sample playbook runs it as its last play, where it does nothing until a run asks for it with-e permit_software_updates=true. It then updates every package the collection installed to the newest version the repositories offer, and etcd toetcd_version, restarting what needs it, one host at a time:- The pgEdge nodes go zone by zone. A zone's replicas go first, then its leader, after a switchover to an updated replica, so no zone's primary restarts in place. Each node's Patroni, Postgres and etcd are stopped before its packages change and started afterwards, and the next node waits until it streams from its leader again.
- The Spock and Snowflake extensions are updated on each zone's primary where their packages ship a newer version. One whose package has no update path from the installed version is reported and left as it is.
- The HAProxy hosts follow, one at a time.
- pgBackRest is updated last, on every pgEdge node and backup server at once, because a client and repository host on different versions refuse each other. A running backup stops it.
The run reports what it will update, and in what order, before it stops
anything. It refuses to start when pg_allow_restart is false, or when
etcd_version is an earlier minor release than a node runs or more than
one minor release past it. A run that stops partway resumes where it
stopped, and every run first repairs what a cancelled one may have left,
such as the owner of /var/log/pgbackrest. A run with nothing to update
changes nothing. A service still running libraries that an operating system
update replaced is restarted too, in the same order, even when no package
the collection installed changed. (#76)
Changed
-
etcd_versionandetcd_install_dirare defaults ofrole_configrather than ofinstall_etcdandsetup_etcd, soupdate_softwarecan compare a node's etcd with the release the collection installs. Their meaning is unchanged. (#76) -
etcd_versiondefaults to 3.6.17 rather than 3.6.5. A new node gets 3.6.17. A deployed node keeps its etcd until a run withpermit_software_updatesbrings it to the new default, one node at a time. An inventory that setsetcd_versionkeeps its own release. (#76) -
spock_versiondefaults to5.0rather than5.0.4, and is documented as reserved for future use. It will name the major version of Spock to install. No role reads it yet, and the newest Spock the repositories offer is still installed. (#76) -
init_serverrefuses acluster_namethat contains a hyphen on Debian-based systems. Debian runs each cluster as thepostgresql@<version>-<cluster>service, and that unit reads every hyphen in the instance name as a path separator, so it looks for a cluster namedmy-demoin/etc/postgresql/17/my/demoand refuses to start it. Such a deployment used to stop partway throughsetup_postgreswith only "Assertion failed" from systemd; it now stops before anything is installed, with a message that names the cause. RedHat-based systems still accept a hyphen. (EE-41)
Fixed
-
init_serverworks on Rocky Linux 10 and other EL10 distributions. Their systemd keeps its default configuration in/usr/lib/systemd/and installs nologind.conf,coredump.conforsystem.confin/etc/systemd/, so the task that disablesRemoveIPCstopped every deployment with "Destination /etc/systemd/logind.conf does not exist", and withdebug_pgedge, the default, the core dump settings would have failed the same way. The role now writes each setting to a drop-in file named50-pgedge.confin/etc/systemd/logind.conf.d/,/etc/systemd/coredump.conf.d/and/etc/systemd/system.conf.d/, which every supported distribution reads. Rocky Linux 10 joins the validated platforms. The e2e tests gain Rocky 10 images and arocky10choice for the workflows'osinput. (#80) -
The end-to-end tests pass the repository client certificate to every deployment run. Hosts that never had the certificate installed failed to install pgEdge packages, because
install_reposleft the gated repositories disabled: the two nodes the Ultra-HA workflow adds to zone 1, and every host in both workflows' zone-join jobs, which wrote no certificate at all. Every job in both workflows now writes it from thePGEDGE_REPO_CLIENT_CRTandPGEDGE_REPO_CLIENT_KEYsecrets withtests/write-client-cert.sh, and each workflow defines the arguments that pass it once, for all its jobs. The Ultra-HA idempotence checks after adding the nodes and after a switchover pass it as the deployment runs before them do.tests/run-test.shpasses the files named byPGEDGE_CLIENT_CERT_SRCandPGEDGE_CLIENT_KEY_SRC, and stops before building anything when either is unset or unreadable. (#73) -
Patroni replicas on Debian-based systems now start when
patroni_scopeis anything other than<pg_version>-<cluster_name>, such as the per-zone scope that Sharing One Store Across Zones recommends. Patroni built Debian replicas with thepg_clonecluster_patroniscript from Debian's Patroni package, which derives the version and cluster name by splitting the scope at hyphens. With a scope such as17-demo-zone1it created a cluster namedzone1, the replica's own configuration directory stayed empty, andpatronictl listreported the replica asstart failed.setup_patroninow installs/usr/local/bin/patroni_debian_cluster, written withpg_versionandcluster_name, and Patroni uses it both to bootstrap a zone and to clone a replica. A configuration directory left behind by a node whose data is gone is cleared before the cluster is created again. (EE-41) -
finalize_backrestno longer fails on a zone whose primary is on timeline 10 or later. To check that the newest backup can restore the cluster, it reads the current timeline's history file, and it built the file's name withto_hex(), which returns lowercase hex. Postgres names history files in uppercase, so from timeline 10 the role asked for0000000a.historywhile the file was0000000A.history, and the deployment playbook failed. Every switchover or failover moves a zone to a new timeline, so a zone reached this after nine of them. The role now folds the name to uppercase, and so does the end-to-end check intests/verify/verify-commit.ymlthat reads the same file. (#77)