When simulating, or if the failover functionality of a ArcGIS data store is invoked, the 'makePrimary' REST command is automatically executed on the standby data store machine, and it becomes the new primary data store. However, the following error is returned in the server logs:
Error: Server machine 'https://<primary machine>:2443/arcgis/datastoreadmin/machines/<standby machine>/makePrimary' returned an error. 'Machine 'https://<standby machine>:2443/arcgis/datastoreadmin/' returned an error. 'Failed to change role for data store machine '<standby machine>'.. Extended error message: Validation checks on data store machine '<standby machine>' failed.
By default, the primary data store is set to READWRITE mode and the standby data store is set to READONLY.
When a failover occurs, the standby data store becomes the new primary data store and inherits its settings, including the READWRITE mode. On the other hand, the original primary data store automatically becomes the standby data store and changes to READONLY mode.
However in some cases where testing is involved, the primary data store may be set to READONLY. In such situations, when the failover occurs, the standby data store automatically inherits the READONLY mode setting, prompting the error.
As best practice, ensure the primary data store is always in READWRITE mode. This helps in the event of a failover, because the standby data store is able to inherit the necessary settings from the primary data store.
If it is a simulated failover, change the primary data store to READWRITE mode before invoking the failover with the makePrimary request operation. Refer to Portal for ArcGIS: changedatastoremode for more information.