Open nyetsche opened 1 year ago
Thank you for the report. I have added your request to our feature backlog.
Patch for this: https://github.com/aws/aws-parallelcluster-cookbook/pull/2729
Another issue related to this: https://github.com/aws/aws-parallelcluster-cookbook/pull/2499
This was noticed in pcluster 3.6.0 and affects earlier versions as well.
The
/etc/profile.d/pcluster.sh
script is created byhttps://github.com/aws/aws-parallelcluster-cookbook/blob/v3.6.0/cookbooks/aws-parallelcluster-install/templates/default/base/pcluster.sh.erb#L6
; it points to a virtualenv with variouscfn-
scripts used for updates, install, etc. All fine.But, everything in
/etc/profile.d/*
is sourced by interactive shells; regular users get this added to their$PATH
, ex:/usr/bin
,/usr/local/bin
and so on are all before/opt/parallelcluster/pyenv/versions/3.7.16/envs/cfn_bootstrap_virtualenv/bin
; so for the most part this is no big deal. But at least on RHEL8,/usr/bin/pip
no longer exists (choose between/usr/bin/pip3
or/usr/bin/pip2
). Some of my users are typingpip
and getting sent to the copy in the virtualenv.Is it required that the CFN virtualenv be set in
$PATH
for all users ? The user-data startup script sources it:https://github.com/aws/aws-parallelcluster/blob/v3.6.0/cli/src/pcluster/resources/head_node/user_data.sh#L104
and the CFN templates:
https://github.com/aws/aws-parallelcluster/blob/develop/cli/src/pcluster/templates/cluster_stack.py#L1141 https://github.com/aws/aws-parallelcluster/blob/develop/cli/src/pcluster/templates/cluster_stack.py#L1232
But a
source
'd file anywhere on disk would be sufficient, it doesn't have to be in/etc/profile.d/
.