Details
-
Feature
-
Status: Deferred (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
Current Situation
- Global variables can be exposed to jobs and monitors by use of:
- Environment Variables: such variables are defined at JobScheduler start-up.
- For a Master this is performed with the ./user_bin/jobscheduler_environment_variables.sh | .cmd script.
- For an Agent this is performed with the ./bin/jobscheduler_agent_<port>.sh | .cmd instance script.
- Such variables cannot be modified by jobs and monitors.
- JobScheduler Variables:
- Such variables are configured with the ./config/scheduler.xml file like this:
<params> <param name="scheduler.variable_name_prefix" value="SCHEDULER_PARAM_"/> <param name="my_variable" value="my_value"/> </params>
- The variables can be accessed by environment variables using the respective prefix, for the above example this is SCHEDULER_PARAM_MY_VARIABLE. In addition the JobScheduler API includes methods to access and to modify such variables, see Variable_set reference. However, modifications are not persistent and will be effective for the given JobScheduler Master run only.
- Such variables are valid within the scope of a JobScheduler Master instance, they are not forwarded in case of fail-over with a JobScheduler Master passive cluster.
- Such variables are configured with the ./config/scheduler.xml file like this:
- Environment Variables: such variables are defined at JobScheduler start-up.
- There is no way to use persistent global variables that work across JobScheduler Master instances in case of fail-over.
Desired Behavior
- A new type of Persistent Variables should be introduced that are stored with the JobScheduler database:
- the variables are exposed as environment variables to shell jobs and they are exposed by API methods to scripted jobs (JavaScript, PowerShell).
- access to Persistent Variables is consistent, i.e. concurrency of jobs modifying such variables is considered.
- the variables are persistent across a number of JobScheduler Master instances in case of fail-over.
Maintainer Notes
- This feature is not assigned to a specific release for now. You can vote for this issue to make it real.
- Your input is welcome: let us know your requirements for use of global variables.
Attachments
Issue Links
- links to