Saves the settings that Fence uses. They always exist and start at
their defaults, so you can save them before the first Fence. If the
cluster is fencing or fenced, a change puts it in
CLUSTER_FENCE_STATE_FENCING until every broker has the new settings.
Returns the fence after the change.
Body
Required
-
If set, the request fails unless the fence is still at this revision. Use the
revisionfromGetClusterFenceStatusor an earlier response. Set it to fail if the fence changed since you read it. -
The values to save. Only the fields that
update_masknames are read, or every field whenupdate_maskis empty.Additional properties are NOT allowed.
-
The settings to change. Settings it doesn't name keep their saved values. Naming
read_policyreplaces the whole read policy, and namingread_policy.exempt_principalsadds names to the list. If empty, every setting is replaced.
curl \
--request POST 'http://localhost:9644/redpanda.core.admin.v2.ClusterFenceService/UpdateClusterFenceSettings' \
--header "Content-Type: application/json" \
--header "Connect-Protocol-Version: 1" \
--header "Connect-Timeout-Ms: 42.0" \
--data '{
"expectedRevision": 42,
"settings": {
"readPolicy": {
"allowAllReads": true,
"exemptPrincipals": [
"string"
]
},
"scope": {
"allResources": {}
}
},
"updateMask": "string"
}'
# Headers
Connect-Protocol-Version: 1
Connect-Timeout-Ms: 42.0
# Payload
{
"expectedRevision": 42,
"settings": {
"readPolicy": {
"allowAllReads": true,
"exemptPrincipals": [
"string"
]
},
"scope": {
"allResources": {}
}
},
"updateMask": "string"
}
{
"fence": {
"revision": 42,
"settings": {
"readPolicy": {
"allowAllReads": true,
"exemptPrincipals": [
"string"
]
},
"scope": {
"allResources": {}
}
},
"state": "CLUSTER_FENCE_STATE_UNSPECIFIED",
"stateChangedAt": "2023-01-15T01:30:15.01Z"
}
}
{
"code": "not_found",
"details": [
{
"debug": {},
"type": "string",
"value": "@file"
}
],
"message": "string"
}