Skip to content

(3.1.1 3.1.2) Profiles not loaded when connected through NICE DCV session

Francesco Giordano edited this page May 2, 2022 · 4 revisions

The issue

Starting from ParallelCluster 3.1.1, NICE DCV package has been upgraded to version 2021.3.11591-1. Starting from this version of NICE DCV, the init script for Linux virtual sessions does not load the user's bash profile anymore by default.

A user creating a cluster with ParallelCluster and then connecting to the head node via DCV won’t be able to run Slurm commands (e.g. sinfo) or other commands requiring the user profile (e.g. module avail) from a terminal opened in the DCV session.

Affected versions (OSes, schedulers)

  • The issue impacts ParallelCluster 3.1.1 and 3.1.2
  • All the OSes supported by ParallelCluster are affected.

Mitigation

Alternative 1

The suggested solution is to create a new cluster with ParallelCluster >= 3.1.3 on which the issue has been solved. The profiles will be automatically loaded in the shell executed in the DCV session.

Alternative 2

This alternative illustrates how to modify the NICE DCV configuration in the head node of an existing cluster.

  1. SSH to the head node with pcluster ssh -n cluster-name,
  2. edit the /etc/dcv/dcv.conf file adding virtual-session-source-profile = true under the section [session-management],
  3. close the current DCV session (if any) with the command: dcv close-session $(dcv list-sessions -j | jq -r '.[0].id'),
  4. create a new DCV session with the pcluster dcv-connect command. It will source the user profile by default.

Error details

Starting from NICE DCV 2021.3.11591-1 the init script for Linux virtual sessions does not load the user's bash profile anymore, please refer to NICE DCV 2021.3.11591 changelog for more information.

A new configuration parameter virtual-session-source-profile has been introduced. This parameter specifies whether the shell that runs the session starter script should source the user profile. By default this is false and DCV runs the session starter script with bash --noprofile --norc.

ParallelCluster configures DCV to load the profile starting from 3.1.3 release: https://github.com/aws/aws-parallelcluster-cookbook/pull/1418

Clone this wiki locally