Appearance
Upgrade and rollback
Problems with upgrading Spalto, rolling back, and version differences between HA peers.
waap upgrade check or the package install says REFUSED
- Cause: one of these:
- the store is from a development build, not a release ("not from a released version");
- the store is newer than the target ("downgrading in place is not supported");
- the configuration file, or the stored active configuration, has a key that the new version does not read;
- there is not enough free disk for the backup;
- the target is more than one minor version ahead of the HA peer.
- Check:
waap upgrade check -config /etc/waap/waap.yaml -data-dir /var/lib/waapnames the reason. Add-jsonfor the full report. - Fix: for a development store, use
-allow-unreleased(orWAAP_UPGRADE_ALLOW_UNRELEASED=1), if you accept the risk. For a newer store, use the version that wrote it, or roll back. For the configuration, fix the named key. For disk space, free it, or use-backup-diron another volume. For the peer, upgrade it first, one minor version at a time. When the check fails, the package stops after unpacking. The service keeps running the old process, and the store is untouched.
Pre-upgrade backup failed, the service was not restarted
- Cause: the backup directory cannot be written (permissions, a file in the way, or a full disk). Or a file the configuration refers to is missing or unreadable. Or a custom
-passphrase-fileis shorter than 12 characters. - Check: the message after "the pre-upgrade backup failed". Run
ls -ld /var/lib/waap/backups, anddf -h /var/lib/waap. - Fix: remove the cause, then run
dpkg --configure waap(deb), orsudo -u waap waap upgrade run -backup-only -config /etc/waap/waap.yaml -data-dir /var/lib/waapandsystemctl start waap(rpm). Both remove/var/lib/waap/upgrade-blocked. The store was not changed, so installing the old package again also works.
rpm upgrade "succeeded" with warning: %post(waap-...) scriptlet failed, exit status 1
- Cause: rpm (and dnf) treat a failed post-install scriptlet as a warning and exit 0. The new files are installed, but the pre-upgrade backup failed. The lines starting with
waap:above the warning say why. - Check:
ls /var/lib/waap/upgrade-blocked(the file is present), andsystemctl status waap(the service was not restarted). - Fix: follow "Pre-upgrade backup failed" above. Do not delete the marker by hand. Without a backup, there is no rollback.
The service does not start: "not starting: the pre-upgrade backup failed"
- Cause:
/var/lib/waap/upgrade-blockedexists. An earlier package upgrade could not write its backup, so the unit refuses to migrate the store, including after a reboot.waap.service,waap-control.serviceandwaap-inspect.serviceall check it, because every role opens the store. - Check:
cat /var/lib/waap/upgrade-blockedshows when and how to clear it.journalctl -u waapshows the logs. For split roles, usejournalctl -u waap-control -u waap-inspect. - Fix: run
sudo -u waap waap upgrade run -backup-only -config /etc/waap/waap.yaml -data-dir /var/lib/waap. This removes the marker after a good backup, or when there is nothing to migrate. Then runsystemctl start waap.
The service refuses to start: "database schema version N is newer than this binary"
- Cause: an older binary was started on a store that a newer version migrated. This happens with an installed old package, or after a rollback of the program without its data. By design, nothing is changed.
- Check:
waap upgrade check -data-dir /var/lib/waapshows the store's schema and release. - Fix: install the newer version again. Or go back properly: run
systemctl stop waap, thenwaap upgrade rollback -old-binary /path/to/old/waap. This restores the pre-upgrade backup into the old format, and keeps newer files inrolled-back-<time>/. Then start the old version.
Rollback: "no pre-upgrade backup" or "wrong passphrase"
- Cause: there is no
pre-*.waapbakin<data-dir>/backups. Either the upgrade did not write one, or the directory was moved. Or the.keyfile beside it is missing. - Fix: name the files explicitly, with
-backup FILE -passphrase-file KEY. Without a backup, there is no way back to the old store format. Restore awaap backuptaken earlier, or stay on the new version.
Configuration load: "unknown key" or "version: must be 1 or 2"
- Cause: the file has a key that this version does not know (a typo, or a file written for a newer release). Or
version:is higher than 2. - Check:
waap validate -config FILEnames the line. - Fix: correct or remove the key. For a file from a newer release, upgrade first.
HA: "peer software too old" (replication refused) or "the peer runs newer software"
- Cause: the two nodes are more than one minor version apart. The newer node refuses to replicate with the older one, and the older node does not follow a newer one.
- Check:
waap ha status(both software versions), the standby's replication error, and the system eventha.replication. - Fix: upgrade the older node to within one minor version of the other. Upgrade one node at a time.