HomeClusterLabs Projects

Fix: based: Successful CIB schema upgrade should always force a write

Description

Fix: based: Successful CIB schema upgrade should always force a write

Currently, cibadmin --upgrade --force upgrades the in-memory CIB but
doesn't write it to disk. It should write to disk if it succeeds.

If the upgrade wouldn't change the validation schema, or if it fails for
any other reason, the rc from cib_perform_op will be an error. In that
case, don't write to disk.

The approach used here is to set config_changed = TRUE while processing
an upgrade request. This isn't technically a config change in the way
we've historically used the term (a change to the <configuration>
section), but it's convenient to use the config_changed boolean for this
too.

Closes T565

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Dec 1 2022, 8:53 PM
Parents
rPa7ba4849bd48: Low: based: Don't write to disk if CIB replace failed
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task