Skip to content

Commit dc34183

Browse files
committed
Add PCLUSTER_PYTHON_ROOT to event handler environment
PCLUSTER_PYTHON_ROOT points to the bin folder of the python installation for the event handler, e.g. `/home/pcluster-scheduler-plugin/.pyenv/versions/3.9.9/envs/scheduler_plugin_virtualenv/bin` Signed-off-by: Luca Carrogu <[email protected]>
1 parent c5c6071 commit dc34183

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cookbooks/aws-parallelcluster-scheduler-plugin/resources/execute_event_handler.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ def build_static_env(target_cluster_config, target_launch_templates, target_inst
185185
# PCLUSTER_HEADNODE_HOSTNAME
186186
env.merge!(build_hash_from_node('PCLUSTER_HEADNODE_HOSTNAME', true, :hostname))
187187

188+
# PCLUSTER_PYTHON_ROOT
189+
env.merge!({ 'PCLUSTER_PYTHON_ROOT' => "#{node['cluster']['scheduler_plugin']['virtualenv_path']}/bin" })
190+
188191
# PCLUSTER_CLUSTER_CONFIG_OLD
189192
# TODO: to be implemented
190193

0 commit comments

Comments
 (0)