-
Xavier Thompson authored
Add scripts in bin directory that can be called manually to apply a new primary-url (after having edited it in the instance parameters) by turning a primary into a replica or by making a replica follow a new primary, all without deleting existing data - so this is useful when the existing data does not diverge from the new primary. Being able to start replicating from a new primary without deleting existing data is convenient, but maybe it's better or sufficient or both to only be able to tell a mariadb to just destroy its existing data and re-bootstrap from scratch. Being able to delete all existing data and start from scratch seems necessary in any case, but it's not clear that a special feature is needed for this: maybe it's completely enough to be able to destroy and re-request the instance through standard slapos operations. Questions remain for automated usage: 1. One option is to provide a url the user may simply interact with (clickable button ...) to call the appropriate script. This kind of interaction could also be used to trigger the deletion of all existing data for a fresh bootstrap. 2. Another option is that editing the primary-url in the parameters results in the appropriate script being called. This makes sense as a way to remain in sync with given parameters, although there are some drawbacks: the uncertain propagation time, and the fact there is no guarantee that the existing data can converge to the state of the new primary. This might be grounds to keep all this strictly manual. In any case, this relies already on the propagation of the instance parameters to input the new primary-url, so it may not be useful at all for any use-case, manual or automated.
e61b3949