?>Array ( [id] => 134 )
Scénario de test & Cas d'usage
Simulate a CAS environment with a single primary controller and no backup. This is a common starting point before enabling HA.
| 1 | /* Initial state: 1 primary controller, 0 backup controllers. */ |
| 1 | PROC CAS; |
| 2 | BUILTINS.serverStatus; |
| 3 | RUN; |
| 1 | PROC CAS; |
| 2 | BUILTINS.addNode / |
| 3 | node={"cascontroller02.example.com"}, |
| 4 | role="CONTROLLER"; |
| 5 | RUN; |
| 1 | PROC CAS; |
| 2 | BUILTINS.serverStatus; |
| 3 | RUN; |
The action should succeed. The final server status must report two controllers: one with the role 'primary' and the new one with the role 'backup'. The server is now in a high-availability configuration.