CorefinityCorefinityDocs
Open the Control PanelControl Panel
Web server rules · 14 of 14

corestack_nginx_rules_drift_resolve

Answer an nginx rules drift.

Scope writeNo secrets returned
On this page

When to use it

Answer a drift on an environment row. corestack_nginx_rules_get shows drift when the nginx rules in the environment's configuration repository were changed outside the Control Panel (for example by a hand edit): drift.hooks names the hooks that differ, drift.diff shows how, and drift.committed_valid says whether the repository's version passes the platform's checks. Ask the person which answer they want, then call this with the version that read answered. It is the Nginx tab's Use the committed version and Keep the Control Panel's.

  • committed: the repository's rules become the saved rules, as a new revision authored by the person and this token. It is unverified (pending_verify) until the platform checks it like a save; a failed check puts the last verified rules back automatically. Nothing is committed: the repository already holds the rules. Follow it with corestack_nginx_rules_get (status.state).
  • panel: the Control Panel's rules stay the saved rules and nothing is written. This drift stops being shown, and the next save (corestack_nginx_rules_update) writes the Control Panel's rules again. A later change outside the Control Panel shows as a new drift.

Saving again with corestack_nginx_rules_update also replaces a drift with the saved rules. The answer is {action, revision, note}: revision (id, number, status) for committed, null for panel.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_nginx_rules_drift_resolve with site_id 4211, version 7, action committed. (Answer an nginx rules drift.) Tell me what it returned.

Inputs

actionstringRequired

committed: use the rules the repository holds (a new revision, checked like a save). panel: keep the Control Panel's rules; nothing is written.

committedpanel
site_idintegerRequired

The environment row. At least 1.

versionintegerRequired

The version from corestack_nginx_rules_get. At least 0.

Example call

tools/call
{
  "name": "corestack_nginx_rules_drift_resolve",
  "arguments": {
    "site_id": 4211,
    "version": 7,
    "action": "committed"
  }
}

If it is refused

ReasonWhat to do
staleThe rules changed since version was read; read them again with corestack_nginx_rules_get.
no_driftThere is no change made outside the Control Panel to answer (already answered, or never there).
nginx_rules_lockedCorefinity staff hold this environment's nginx rules.
busyAnother change runs on the environment; retry when it ends. committed only.
change_pendingA change is queued for tonight, or the last move of Corefinity's rules is still being checked. committed only.
inventory_behindThe repository changed again after the drift was read; read the rules again, review the new drift, then answer. committed only.
files_missingThe repository lacks a hook file this environment carries, so the committed version is incomplete; answer panel (the next save writes the file again). committed only.
nginx_invalidThe repository's rules break the platform's policy; details.diagnostics lists each error with hook, line and code (banner_changed: a hook's first lines were edited). Answer panel or save corrected rules. committed only.
upstream_unavailableThe environment's configuration repository cannot be read right now; try again in a few minutes. committed only.
managed_elsewhereAnother 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_argumentsThe 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_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe 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_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT