feat: configurable session root directory #513
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on:
What was the problem/requirement? (What/Why)
Currently the Worker Agent has a hard-coded root directory under which session directories are created.
/sessions
%PROGRAMDATA%\Amazon\OpenJD
Those using the worker agent may want to customize the directory where the sessions are created.
What was the solution? (How)
Added a new session root directory setting to the worker agent configuration. As with other worker agent settings, this can be set using multiple sources in the following order of precedence (first is higher priority):
--session-root-dir
DEADLINE_WORKER_SESSION_ROOT_DIR
[worker]
→session_root_dir
/sessions
on Linux%PROGRAMDATA%\Amazon\OpenJD
on WindowsThe setting is supplied in the
install-deadline-worker
command using the--session-root-dir
CLI argument which will create (if needed) the worker agent configuration file and modify thesession_root_dir
setting. The installer will also provision the directory as needed and ensure it has the correct file-system ACLs.The setting is now loaded on launch and passed down through the call stack and supplied to
session_root_directory
kwarg of theSession
class inopenjd-sessions
(code ref).What is the impact of this change?
Those using the worker agent can configure where session directories will be created on the worker host.
How was this change tested?
Was this change documented?
The new
session_root_dir
was added to theworker.toml.example
file with documentation commentsIs this a breaking change?
No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.