Class DaemonCommandEntity
One instruction for a daemon: start, stop or restart a named application.
public class DaemonCommandEntity
- Inheritance
-
DaemonCommandEntity
- Inherited Members
Remarks
The security of the whole control plane is the shape of this row. It carries a verb from a closed enumeration and the name of an application the daemon already supervises. It carries no path, no arguments, no shell and nothing else the daemon executes. Somebody who can write to this table can restart a FishMMO process; they cannot make a game host run something new. Adding a column that changes that would turn a database password into remote code execution.
Claimed before it is executed. A daemon takes a command atomically and stamps itself on it, so two daemons cannot both act on one row, and a daemon that dies mid-command leaves a claimed row that can be seen rather than one that is silently done twice.
And it expires. A command nobody collected is abandoned rather than executed late: restarting a world server twenty minutes after an operator asked, once they have moved on and players are back on it, is worse than never doing it at all.
Properties
AppName
Which supervised application, by the name the daemon knows.
public string AppName { get; set; }
Property Value
ClaimedBy
Which daemon instance took it.
public string ClaimedBy { get; set; }
Property Value
Remarks
The instance, not the host: a daemon restarted mid-command comes back with a new identity, which is how an abandoned claim is told from one still being worked.
ClaimedUtc
When a daemon took it, or null while it is still waiting.
public DateTime? ClaimedUtc { get; set; }
Property Value
CompletedUtc
When it finished, either way.
public DateTime? CompletedUtc { get; set; }
Property Value
ExpiresUtc
After which it must not be executed.
public DateTime ExpiresUtc { get; set; }
Property Value
HostName
Which host it is for. A daemon claims only its own.
public string HostName { get; set; }
Property Value
ID
Surrogate key.
public long ID { get; set; }
Property Value
Outcome
What happened, in words, for the operator who asked.
public string Outcome { get; set; }
Property Value
Reason
Why. Also recorded in the audit log.
public string Reason { get; set; }
Property Value
RequestKey
The writer's once-per-request identity: a retry after a lost reply finds the row its first attempt wrote instead of writing a second one. Null for rows written without one.
public Guid? RequestKey { get; set; }
Property Value
- Guid?
RequestedBy
The operator account that asked. Copied, with no foreign key.
public string RequestedBy { get; set; }
Property Value
RequestedUtc
When they asked.
public DateTime RequestedUtc { get; set; }
Property Value
Succeeded
Whether it worked. Null until it has finished.
public bool? Succeeded { get; set; }
Property Value
- bool?
Verb
Start, stop or restart. Nothing else exists.
public DaemonCommandVerb Verb { get; set; }