Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ This file is used to list changes made in each version of the AWS ParallelCluste
- Upgrade amazon-efs-utils to version 2.4.0 (from v2.1.0) for Amazon Linux AMI's.

**BUG FIXES**
- Fix Xdcv segfault on RHEL9 and Rocky9 caused by DCV attempting GL initialization when GPU acceleration is not supported.
- Fix a failure when creating a cluster with GPU instances and with DCV enabled but without internet access.
- Fix build-image failure during ubuntu-desktop installation on a Ubuntu parent image with outdated OS packages.
- Fix the CloudWatch agent configuration to ensure proper parsing of timestamps across all log files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def optionally_disable_rnd

action :configure do
if dcv_supported? && (node['cluster']['node_type'] == "HeadNode" || node['cluster']['node_type'] == "LoginNode")
if dcv_gpu_accel_supported?
gpu_accel = dcv_gpu_accel_supported?
if gpu_accel
# Enable graphic acceleration in dcv conf file for graphic instances.
allow_gpu_acceleration
else
Expand Down Expand Up @@ -234,6 +235,7 @@ def optionally_disable_rnd
owner 'root'
group 'root'
mode '0755'
variables(gpu_accel_supported: gpu_accel)
end

# Create directory for the external authenticator to store access file created by the users
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,12 @@ def self.nothing(chef_run)
it 'starts Amazon DCV server' do
is_expected.to enable_service('dcvserver').with_action(%i(enable start))
end

it 'passes gpu_accel_supported=true to dcv.conf template' do
is_expected.to create_template('/etc/dcv/dcv.conf').with(
variables: { gpu_accel_supported: true }
)
end
end

context "when g2 instance" do
Expand Down Expand Up @@ -1001,6 +1007,12 @@ def self.nothing(chef_run)
.with_code(/systemctl set-default graphical.target/)
.with_code(/systemctl isolate graphical.target &/)
end

it 'passes gpu_accel_supported=false to dcv.conf template' do
is_expected.to create_template('/etc/dcv/dcv.conf').with(
variables: { gpu_accel_supported: false }
)
end
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@
# 'dcv-gl' feature (a specific license will be required).
# Allowed values: 'always-on', 'always-off', 'default-on', 'default-off'.
# If not specified, the default value is 'default-on'.
<% if @gpu_accel_supported %>
#enable-gl-in-virtual-sessions = "default-on"
<% else %>
# Explicitly disable dcv-gl on instances where GPU acceleration is not supported
# (e.g. g5g) to prevent Xdcv segfaults during GLX initialization.
enable-gl-in-virtual-sessions = "always-off"
<% end %>

# Property "virtual-session-source-profile" specifies whether the shell that
# runs the session starter script should source the user profile.
Expand Down Expand Up @@ -99,7 +105,10 @@ virtual-session-source-profile = true
# second that are sent to the client. A higher value consumes more bandwidth
# and resources. By default it is set to 25. Set to 0 for no limit
#target-fps = 30
<% unless node['cluster']['dcv']['is_graphic_instance'] %>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IS this an attribute we set, i cant find it being mentioned anywhere so we add these display-encodes for all instances regardless it is GPU or not? Or is this an ExtraChefAttribute?

Copy link
Copy Markdown
Contributor Author

@gmarciani gmarciani Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This attribute was supposed to be set by the cookbook config phase (not injected through dev settings) and it used to be. However, we mistakenly removed it in 04893c21. Added info in the Pr description.

<% unless @gpu_accel_supported %>
# On instances that do not support GPU acceleration, DCV must use
# software-only encoders because there is no GPU that can be used
# for hardware encoding.
display-encoders=['turbojpeg', 'lz4', 'ffmpeg']
<% end %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_mode 0755 }

unless instance.graphic? && instance.nvidia_installed? && instance.dcv_gpu_accel_supported?
its('content') { should match /enable-gl-in-virtual-sessions\s*=\s*"always-off"/ }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add the check for display-encoders?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Addressed

its('content') { should match /display-encoders=\['turbojpeg', 'lz4', 'ffmpeg'\]/ }
end
end

describe directory('/var/spool/parallelcluster/pcluster_dcv_authenticator') do
Expand Down
Loading