corestack_ nginx_ rules_ revert
Restore an nginx rules revision.
When to use it
Restore an earlier nginx rules revision on an environment row: its four hooks become a new revision, checked, tested and saved like any change (rolled back automatically if the platform rejects it). Needs the version corestack_nginx_rules_get answered.
Every hook takes the old revision's text, a hook it did not have included (cleared). The answer and the task are corestack_nginx_rules_update's.
Ask for it
Using the Corefinity MCP server, call corestack_nginx_rules_revert with site_id 4211, revision_id 812, version 7. (Restore an nginx rules revision.) Tell me what it returned.Inputs
Only when the restored rules adopt the runtime update on save: now or tonight. Default now. window: the row's next maintenance window (tonight is kept as its alias). Defaults to now.
nowwindowtonightWhy, shown in the history (default "Restored revision N"). Up to 200 characters.
The revision to restore (from corestack_nginx_rules_history_list). At least 1.
The environment row. At least 1.
A passed test for this same content. At least 1.
The version from corestack_nginx_rules_get. At least 0.
Example call
{
"name": "corestack_nginx_rules_revert",
"arguments": {
"site_id": 4211,
"revision_id": 812,
"version": 7
}
}If it is refused
| Reason | What to do |
|---|---|
stale | The rules changed since version was read; read them again with corestack_nginx_rules_get. |
nginx_invalid | The policy refused the rules; details.diagnostics lists each error with hook, file line and column. |
nginx_test_failed | Nginx -t failed on the environment's nginx; details.diagnostics. |
hook_unavailable | A hook (or a rule) needs the one-time runtime update, which cannot be turned on for this environment yet. |
nginx_rules_locked | Corefinity staff hold this environment's nginx rules. |
busy | Another change runs on the environment; retry when it ends. |
change_pending | A change is queued for tonight. |
batch_window | Adopting now is not possible outside the environment's window; send apply: tonight. |
migration_halted | The night's migration is halted; send apply: tonight. |
apm_provenance_unreadable | image_volume_unsupported, legacy_module_unmapped: the runtime update cannot be turned on until Corefinity checks the environment (contact support). |
too_large | A hook is over its size limit. |
managed_elsewhere | Another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done. |
invalid_arguments | The arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again. |
tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |
Path apps
A revert restores the revision's path apps and gates with its four hooks: the environment's whole list becomes the revision's (a revision without any clears the list). The restored list is checked as any saved one: a record the policy refuses is nginx_invalid with the record named in details.diagnostics (hook path_apps). While this environment cannot serve path apps (corestack_nginx_rules_get answers path_apps.available false), the hooks are restored and the current list is kept.