|
| 1 | +--- |
| 2 | +title: multiple cluster managers |
| 3 | +layout: default |
| 4 | +design_doc: true |
| 5 | +revision: 1 |
| 6 | +status: proposed |
| 7 | +--- |
| 8 | + |
| 9 | +Xapi currently uses a cluster manager called |
| 10 | +[xhad](../../features/HA/HA.html). Sometimes other software comes with its own |
| 11 | +built-in way of managing clusters, which would clash with xhad (example: |
| 12 | +xhad could choose to fence node 'a' while the other system could fence node |
| 13 | +'b' resulting in a total failure). To integrate xapi with this other software |
| 14 | +we have 2 choices: |
| 15 | + |
| 16 | +1. modify the other software to take membership information from xapi; or |
| 17 | +2. modify xapi to take membership information from this other software. |
| 18 | + |
| 19 | +This document proposes a way to modify xapi to take membership information from |
| 20 | +external software. |
| 21 | + |
| 22 | +API changes |
| 23 | +=========== |
| 24 | + |
| 25 | +- New RO field `Pool.ha_cluster_stack` of type string which will be set to 'xhad' |
| 26 | + on upgrade. |
| 27 | +- New parameter to `Pool.enable_ha` called `cluster_stack` of type string which |
| 28 | + will have the default value of empty string (meaning: let the implementation |
| 29 | + choose). |
| 30 | + |
| 31 | +Since other software will require specific `cluster_stack` settings we will |
| 32 | +define new exceptions: |
| 33 | + |
| 34 | +- `UNKNOWN_CLUSTER_STACK`: the operation cannot be performed because the |
| 35 | + requested cluster stack does not exist. The user should check the |
| 36 | + type was entered correctly and, failing that, check to see if the software |
| 37 | + is installed. The exception will have a single parameter: the name of the |
| 38 | + cluster stack which was not found. |
| 39 | +- `INCOMPATIBLE_CLUSTER_STACK_ACTIVE`: the operation cannot be performed because an |
| 40 | + incompatible cluster stack is active. The single parameter will be the name |
| 41 | + of the required cluster stack. This could happen (or example) if you tried to |
| 42 | + create an OCFS2 SR with XenServer HA already enabled. |
| 43 | +- `CLUSTER_STACK_CONSTRAINT`: HA cannot be enabled with the provided cluster |
| 44 | + stack because some third-party software is already active which requires |
| 45 | + a different cluster stack setting. The two parameters are: a reference to |
| 46 | + an object (such as an SR) which has created the restriction, and the name |
| 47 | + of the cluster stack that this object requires. |
| 48 | + |
| 49 | +Implementation |
| 50 | +============== |
| 51 | + |
| 52 | +The `xapi.conf` file will have a new field: `cluster-stack-root` which will |
| 53 | +have the default value `/usr/libexec/xapi/cluster-stack`. The existing `xhad` |
| 54 | +scripts and tools will be moved to `/usr/libexec/xapi/cluster-stack/xhad/`. |
| 55 | +A hypothetical cluster stack called `foo` would be placed in |
| 56 | +`/usr/libexec/xapi/cluster-stack/foo/`. |
| 57 | + |
| 58 | +In `Pool.enable_ha` with `cluster_stack="foo"` we will verify that the |
| 59 | +subdirectory `<cluster-stack-root>/foo` exists. If it does not exist, then |
| 60 | +the call will fail with `UNKNOWN_CLUSTER_STACK`. |
| 61 | + |
| 62 | +Alternative cluster stacks will need to conform to the exact same interface |
| 63 | +as [xhad](../../features/HA/HA.md). |
0 commit comments