Avoiding potential replication conflicts
In an environment where two sites are synchronizing their data with asynchronous replication (for example, over long distances) conflicts between documents are possible if documents are edited simultaneously on both sites.
One such possible scenario is if two users simultaneously create a new version of a runbook. This creates two new documents, but both have the same version numbers. In this situation, Runbook Automation uses a deterministic algorithm to decide which document to use.
Take either of the following actions to discover any potential runbook replication conflicts in
your system:
- Use the API and retrieve all versions of a runbook by using the version query parameter and set it to all. The output shows if all versions have different versions numbers (these are in the parameter called _version). If two documents have the same value for _version, the first document in the list is the one used by Runbook Automation.
- Open the runbook in the Preview view in the Runbook UI. The version tab displays all versions, including the duplicated document for the same version. You can run each version from there or review the differences between the conflicting versions.
Take either of the following actions if you want to use the version not selected by
Runbook Automation:
- Use the API and retrieve all versions of the runbook in question. Store the content of the
runbook that you want as the latest version and use it to create a new version with the
PATCH /runbooks/{runbookId}
API endpoint by setting the query parameterpublish
totrue
. - Open the version that you want to use in the Preview view in the Runbook UI. Make a copy of the content and use it to create a new version.
To avoid this scenario, it is recommended to create new runbook versions from only one site in a replicated environment.