Releases: pjanec/dirigent
Occassional startup crash fix
Processes snapshot throttling, no CPU/RAM reports
- Prevents crashes caused by extensive use of AdoptIfAlreadyRunning="1" in SharedConfig.xml.
- Disabled the CPU/RAM usage reports per app, also suspected from occasionally crashing the dirigent.
Problem fixed: Many apps started in close sequence and having AdoptIfAlreadyRunning="1" caused the dirigent process to crash/disappear with no exception or other trace.
Now throttling the GetProcesses() method call frequency to avoid the dirigent from being killed by OS.
-
A log message indicating the active throttling:
FindProcessByExeName(C:\Windows\notepad.exe): Throttling the Process.GetProcesses() calls to prevent resource shortage and being killed by OS. Sleep(311).
MachineTab fix
MachineTab no longer shows gui clients, but just machines, as before.
Hotkeys disabled
Hotkeys removed from config to avoid accidental usage in production.
NOTE: You need to remove the hotkeys definitions from your existing configs to disable them.
Better identification of what GUI has sent a request (adding dirigent's machine name to the random generated GUI client name)
Crash recovery
Dirigent restarts itself after a crash. It adopts running apps it was managing before the crash - the user does not lose the ability restart the apps.
New Dirigent.Agent.Starter process is running on the bacground when the dirigent is, watching for Dirigent.Agent crashes, and restarting it.
It does NOT cover extra features of the master, like restoring the status of dirigent plans or internal scripts, status of TCP CLI connections etc. These are lost and reset to initial state if the master crashes.
Plan late-join. Script CLI.
Plans
Running aps on late-joining machines
Plan now starts apps on remote machine as soon as machine connects
- Before apps not started at all if their hosting machine connected late.
Waiting for machines to connect before starting a plan
New built-in script to start a plan as soon as all machines used in the plan are connected.
StartScript "22C526A2-6F7C-4B25-8233-7EF37619E1CB" "BuiltIns/RunPlanWhenMachinesOnline.cs" "{plan:'plan1', timeout:5}"
Scripts
Script CLI
New commands for running built-in and custom scripts inside dirigent. See docs/CLI.md and docs/Scripts.md for more details.
- StartScript
- KillScript
- GetScriptState
Script API breaking changes
Method naming convention changed to match the CLI command names
- GetAllPlanDefs -> GetAllPlansDef
- GetAllClientStates -> GetAllClientsState
- etc.
Script arguments as well as script results as a JSON string.
Command line options
--startupScript and --startupScriptParams
--startupScript "22C526A2-6F7C-4B25-8233-7EF37619E1CB" --startupScriptParams "{plan:'plan1', timeout:5}"
Allows running a sharedConfig-predefined script (identified by guid) on dirigent master startup.
Windows Terminal support
WindowPoppedUpInitDetector can read title of the console if shown within 'Windows Terminal' app
CLI commands GetClientState, GetAllClientsState
GetClientState returns the status of given client/machine. Returns empty string if client does not exist.
GetAllClientsState gathers the status of all clients/machines known to the Dirigent.
format of the response:
CLIENT:<ClientName>:<IsConnected>:<ReportedSecondsAgo>:<IP address>
req:
GetClientState m1
resp:
CLIENT:m1:1:0.4:127.0.0.1
req:
GetAllClientsState
resp:
CLIENT:m1:1:0.4:192.168.1.1
CLIENT:m2:0:0.2:192.168.1.2
END
More robust against TCP connection drops
Fixes bug that dirigent shows "Offline" and does not execute commands on some computers that are normally online.
Runing processes de-elevated
If Dirigent itself is elevated, it can run processes as non-elevated.
<App AppIdTuple = "m1.a" DeElevate = "1"/>WARNING! Launching in non-elevated mode works like if the process exe was started from the desktop shell, i.e.:
- Process is opened in normal window (ignoring window state settings like Minimized, Hidden...)
- Process does not get any extra env vars provided by the dirigent (ignoring the ENV section from shared config, not setting DIRIGENT_xxx vars etc.)