Skip to content

Commit de6eacd

Browse files
himani2411Himani Deshpande
andauthored
[Dependencies] Upgrade Amazon DCV to 2024.0-18131 (#2836)
* Upgrade DCV to 2024.0-18131 Use differnt DCV naming convention for AL2 Use el7 in rpm naming for AL2 * Re-naming NICE DCV to Amazon DCV --------- Co-authored-by: Himani Deshpande <[email protected]>
1 parent f0a4ebe commit de6eacd

File tree

11 files changed

+64
-42
lines changed

11 files changed

+64
-42
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ This file is used to list changes made in each version of the AWS ParallelCluste
88

99
**CHANGES**
1010
- Upgrade mysql-community-client to version 8.0.39.
11+
- Upgrade NICE DCV to version `2024.0-18131`.
12+
- server: `2024.0-18131-1`
13+
- xdcv: `2024.0.631-1`
14+
- gl: `2024.0.1078-1`
15+
- web_viewer: `2024.0-18131-1`
1116

1217
**BUG FIXES**
1318
- Fix an issue in the way we get region when manage volumes so that it can correctly handle local zone.

cookbooks/aws-parallelcluster-platform/attributes/platform.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
default['cluster']['dcv']['authenticator']['private_key'] = "#{node['cluster']['etc_dir']}/ext-auth-private-key.pem"
3030
default['cluster']['dcv']['authenticator']['virtualenv_name'] = "dcv_authenticator_virtualenv"
3131
default['cluster']['dcv']['authenticator']['virtualenv_path'] = "#{node['cluster']['system_pyenv_root']}/versions/#{node['cluster']['python-version']}/envs/#{node['cluster']['dcv']['authenticator']['virtualenv_name']}"
32-
default['cluster']['dcv']['version'] = '2023.1-16388'
32+
default['cluster']['dcv']['version'] = '2024.0-18131'
3333
default['cluster']['dcv_port'] = 8443
3434

35-
default['cluster']['dcv']['server']['version'] = '2023.1.16388-1'
36-
default['cluster']['dcv']['xdcv']['version'] = '2023.1.565-1'
37-
default['cluster']['dcv']['gl']['version'] = '2023.1.1047-1'
38-
default['cluster']['dcv']['web_viewer']['version'] = '2023.1.16388-1'
35+
default['cluster']['dcv']['server']['version'] = '2024.0.18131-1'
36+
default['cluster']['dcv']['xdcv']['version'] = '2024.0.631-1'
37+
default['cluster']['dcv']['gl']['version'] = '2024.0.1078-1'
38+
default['cluster']['dcv']['web_viewer']['version'] = '2024.0.18131-1'
3939

4040
# OpenSSH settings for AWS ParallelCluster instances
4141
default['openssh']['server']['protocol'] = '2'

cookbooks/aws-parallelcluster-platform/files/dcv/pcluster_dcv_authenticator.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def get_token_info(self, token):
103103

104104
class DCVAuthenticator(BaseHTTPRequestHandler):
105105
"""
106-
Simple HTTP server to handle NICE DCV authentication process.
106+
Simple HTTP server to handle Amazon DCV authentication process.
107107
108108
The authentication process to access to a DCV session is performed by the following steps:
109109
1. Obtain a Request Token:
@@ -191,7 +191,7 @@ def do_GET(self): # noqa N802, pylint: disable=C0103
191191

192192
def do_POST(self): # noqa N802 pylint: disable=C0103
193193
"""
194-
Handle POST requests, coming from NICE DCV server.
194+
Handle POST requests, coming from Amazon DCV server.
195195
196196
The format of the request is the following:
197197
curl -k http://localhost:<port> -d sessionId=<session-id> -d authenticationToken=<token>
@@ -360,7 +360,7 @@ def _is_session_valid(user, session_id):
360360
# because currently DCV doesn't allow list-session to list all session even for non-root user.
361361
# TODO change this method if DCV updates his behaviour.
362362
"""
363-
logger.info("Verifying NICE DCV session validity..")
363+
logger.info("Verifying Amazon DCV session validity..")
364364
# Remove the first and the last because they are the heading and empty, respectively
365365
# All commands and arguments in this subprocess call are built as literals
366366
processes = subprocess.check_output(["/bin/ps", "aux"]).decode("utf-8").split("\n")[1:-1] # nosec B603
@@ -370,7 +370,7 @@ def _is_session_valid(user, session_id):
370370
filter(lambda process: DCVAuthenticator.check_dcv_process(process, user, session_id), processes), None
371371
):
372372
raise DCVAuthenticator.IncorrectRequestError("The given session does not exists")
373-
logger.info("The NICE DCV session is valid.")
373+
logger.info("The Amazon DCV session is valid.")
374374

375375
@staticmethod
376376
def _verify_session_existence(user, session_id):
@@ -402,9 +402,9 @@ class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
402402

403403
def _run_server(port, certificate=None, key=None):
404404
"""
405-
Run NICE DCV authenticator server on localhost.
405+
Run Amazon DCV authenticator server on localhost.
406406
407-
The NICE DCV authenticator server *must* run with an appropriate user.
407+
The Amazon DCV authenticator server *must* run with an appropriate user.
408408
409409
:param port: the port in which you want to start the server
410410
:param certificate: the certificate to use if HTTPSs
@@ -497,12 +497,12 @@ def main():
497497
global logger # pylint: disable=C0103,W0603
498498
logger = _config_logger()
499499
try:
500-
logger.info("Starting NICE DCV authenticator server")
500+
logger.info("Starting Amazon DCV authenticator server")
501501
args = _parse_args()
502502
_prepare_auth_folder()
503503
_run_server(port=args.port if args.port else 8444, certificate=args.certificate, key=args.key)
504504
except KeyboardInterrupt:
505-
logger.info("Closing NICE DCV authenticator server")
505+
logger.info("Closing Amazon DCV authenticator server")
506506
except Exception as e:
507507
fail(f"Unexpected error of type {type(e).__name__}: {e}")
508508

cookbooks/aws-parallelcluster-platform/files/dcv/pcluster_dcv_connect.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,18 @@ _create_dcv_session() {
9090
dcv_session_file="$1"
9191
shared_folder_path="$2"
9292

93-
_log "Creating a new NICE DCV session..."
93+
_log "Creating a new Amazon DCV session..."
9494
# Generate a random session id
9595
sessionid=$(shuf -zer -n20 {A..Z} {a..z} {0..9})
9696
echo "${sessionid}" > "${dcv_session_file}"
9797
dcv create-session --type virtual --storage-root "${shared_folder_path}" "${sessionid}"
98-
_log "NICE DCV session created successfully."
98+
_log "Amazon DCV session created successfully."
9999

100100
echo "${sessionid}"
101101
}
102102

103103
main() {
104-
_log "--- Initializing NICE DCV authentication... ---"
104+
_log "--- Initializing Amazon DCV authentication... ---"
105105

106106
if [[ -z "$1" ]]; then
107107
_fail "The script requires the shared folder as input parameter."
@@ -117,7 +117,7 @@ main() {
117117
fi
118118

119119
if ! systemctl is-active --quiet dcvserver; then
120-
_fail "NICE DCV service is not active on the given instance."
120+
_fail "Amazon DCV service is not active on the given instance."
121121
fi
122122

123123
# Create a session with session storage enabled.
@@ -127,7 +127,7 @@ main() {
127127
sessionid=$(_create_dcv_session "${dcv_session_file}" "${shared_folder_path}")
128128
else
129129
sessionid=$(cat "${dcv_session_file}")
130-
_log "Reusing existing NICE DCV session for the current user."
130+
_log "Reusing existing Amazon DCV session for the current user."
131131

132132
# number of session can either be 0 or 1
133133
number_of_sessions=$(dcv list-sessions |& grep "${user}" | grep -c "${sessionid}")
@@ -145,7 +145,7 @@ main() {
145145
# Retrieve Request Token and Access File name
146146
_log "Retrieving Request Token and Access File name.."
147147
user_token_request=$(/usr/bin/curl --retry 3 --max-time 5 -s -k -X GET -G "https://localhost:${ext_auth_port}" -d action=requestToken -d authUser="${user}" -d sessionID="${sessionid}")
148-
_validate_json "${user_token_request}" "Unable to obtain the Request Token from the NICE DCV external authenticator."
148+
_validate_json "${user_token_request}" "Unable to obtain the Request Token from the Amazon DCV external authenticator."
149149
request_token=$(echo "${user_token_request}" | jq -r .requestToken)
150150
access_file=$(echo "${user_token_request}" | jq -r .accessFile)
151151
_log "Request Token and Access File name obtained successfully."
@@ -160,15 +160,15 @@ main() {
160160
# Retrieve Session Token
161161
_log "Retrieving Session Token.."
162162
session_token_request=$(/usr/bin/curl --retry 3 --max-time 5 -s -k -X GET -G "https://localhost:${ext_auth_port}" -d action=sessionToken -d requestToken="${request_token}")
163-
_validate_json "${session_token_request}" "Unable to obtain the Session Token from the NICE DCV external authenticator."
163+
_validate_json "${session_token_request}" "Unable to obtain the Session Token from the Amazon DCV external authenticator."
164164
session_token=$(echo "${session_token_request}" | jq -r .sessionToken)
165165
_log "Session Token obtained successfully."
166166

167167
if [[ -z "${dcv_server_port}" ]]; then
168168
dcv_server_port=8443
169169
fi
170170

171-
_log "--- NICE DCV authentication performed successfully. ---"
171+
_log "--- Amazon DCV authentication performed successfully. ---"
172172
echo "PclusterDcvServerPort=${dcv_server_port} PclusterDcvSessionId=${sessionid} PclusterDcvSessionToken=${session_token}"
173173
}
174174

cookbooks/aws-parallelcluster-platform/resources/dcv/dcv_alinux2.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ def prereq_packages
2727
gnu-free-serif-fonts glx-utils) + (arm_instance? ? %w(mate-terminal) : %w(gnome-terminal))
2828
end
2929

30+
def dcv_server
31+
"nice-dcv-server-#{node['cluster']['dcv']['server']['version']}.el7.#{dcv_url_arch}.rpm"
32+
end
33+
34+
def xdcv
35+
"nice-xdcv-#{node['cluster']['dcv']['xdcv']['version']}.el7.#{dcv_url_arch}.rpm"
36+
end
37+
38+
def dcv_web_viewer
39+
"nice-dcv-web-viewer-#{node['cluster']['dcv']['web_viewer']['version']}.el7.#{dcv_url_arch}.rpm"
40+
end
41+
42+
def dcv_gl
43+
"nice-dcv-gl-#{node['cluster']['dcv']['gl']['version']}.el7.#{dcv_url_arch}.rpm"
44+
end
45+
3046
action_class do
3147
def pre_install
3248
package prereq_packages do

cookbooks/aws-parallelcluster-platform/resources/dcv/dcv_ubuntu20.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121

2222
def dcv_sha256sum
2323
# Ubuntu20 supports DCV on x86
24-
'5151ad6b589dc573e2e067aed0389913e9ecd50bec81935b12e4f952ef14cc56'
24+
'cf63d51a5bb7ac82569d747215c0118a7468a32c753c0b0fa9c1cf47513c0a0c'
2525
end

cookbooks/aws-parallelcluster-platform/resources/dcv/dcv_ubuntu22.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121

2222
def dcv_sha256sum
2323
# Ubuntu22 supports DCV on x86
24-
'2b996c4a422adaa7912a59cca06f38fcc59451b927be0dc0f49b362ecfcc23fb'
24+
'b30a57f5029b9d8acb59db9fc72f1dbc7c6a33d76dbbfe02017cec553c5b86f9'
2525
end

cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_dcv_common.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def post_install
6060
# empty by default
6161
end
6262

63-
# Configure the system to enable NICE DCV to have direct access to the Linux server's GPU and enable GPU sharing.
63+
# Configure the system to enable Amazon DCV to have direct access to the Linux server's GPU and enable GPU sharing.
6464
def allow_gpu_acceleration
6565
# Update the xorg.conf to set up NVIDIA drivers.
6666
# NOTE: --enable-all-gpus parameter is needed to support servers with more than one NVIDIA GPU.
@@ -124,14 +124,14 @@ def optionally_disable_rnd
124124
if dcv_supported?
125125
# Setup dcv authenticator group
126126
group node['cluster']['dcv']['authenticator']['group'] do
127-
comment 'NICE DCV External Authenticator group'
127+
comment 'Amazon DCV External Authenticator group'
128128
gid node['cluster']['dcv']['authenticator']['group_id']
129129
system true
130130
end
131131

132132
# Setup dcv authenticator user
133133
user node['cluster']['dcv']['authenticator']['user'] do
134-
comment 'NICE DCV External Authenticator user'
134+
comment 'Amazon DCV External Authenticator user'
135135
uid node['cluster']['dcv']['authenticator']['user_id']
136136
gid node['cluster']['dcv']['authenticator']['group_id']
137137
# home is mounted from the head node
@@ -247,7 +247,7 @@ def optionally_disable_rnd
247247
mode '0700'
248248
end
249249

250-
# Start NICE DCV server
250+
# Start Amazon DCV server
251251
service "dcvserver" do
252252
action %i(enable start)
253253
end

cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_rhel_common.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,29 @@
1616
def dcv_sha256sum
1717
if arm_instance?
1818
case el_string
19-
when "el7"
19+
when "amzn2"
2020
# ALINUX2
21-
'f921c50a1f98fc945ac0f740f4181a52fb66b4b70bf13c1b2321823a9ec7e95a'
21+
'894f5a0b2c57bb9433a7124f152b0930d962ab0f2cfc6ea0f1e159893d667e86'
2222
when "el8"
2323
# RHEL and Rocky8
24-
'4d4b794467220ec1b0f3272b6938701ce1282664e25f63497cc30632d71aed17'
24+
'7647d00782fb7f14668571f1e48fffa2b8b587d878b7632b03f40bbb92a757ad'
2525
when "el9"
2626
# RHEL and Rocky9
27-
'a74ee7376bf8595b95386352ff3f95eb5886e7bbc8b8512c53a48be1d3ec6282'
27+
'f9b2fa95f84059c7168ef924b7ffe8b6f4d0d69e2e39280096d4bf76fdfb597c'
2828
else
2929
''
3030
end
3131
else
3232
case el_string
33-
when "el7"
33+
when "amzn2"
3434
# ALINUX2
35-
'31230edd66242038a95986c9207fc0f800986a94ee43bfc901e43521f4eb72a6'
35+
'81e85db767e36c36877879e1d3afc0f20127b9bd81b845fc8599feb9abd04f24'
3636
when "el8"
3737
# RHEL and Rocky8
38-
'9f696bfc21fdfd267a079cd222170b7c737f789ec6f3da66a6666bc1d8fe2648'
38+
'f879513272ac351712814bd969e3862fc7717ada9cfdf1ec227876b0e8ebc77d'
3939
when "el9"
4040
# RHEL and Rocky9
41-
'98a928194ff4c2ee21b52c3ab575ca93e60ca5475bd7bfda1561a5c6adffd7ca'
41+
'5d631b5c0f2f6b21d0e56023432766994e2de5cc13f22c70a954cd643cde5b84'
4242
else
4343
''
4444
end
@@ -47,7 +47,7 @@ def dcv_sha256sum
4747

4848
def el_string
4949
if platform?('amazon')
50-
"el7"
50+
"amzn2"
5151
else
5252
"el#{node['platform_version'].to_i}"
5353
end

cookbooks/aws-parallelcluster-platform/spec/unit/resources/dcv_spec.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ def self.nothing(chef_run)
143143
expect(resource.dcv_web_viewer).to eq("nice-dcv-web-viewer_#{dcv_webviewer_version}_#{dcv_pkg_arch}.#{base_os}.deb")
144144
expect(resource.dcv_gl).to eq("/nice-dcv-gl_#{dcv_gl_version}_#{dcv_pkg_arch}.#{base_os}.deb")
145145
else
146-
dcv_platform_version = platform == "amazon" ? "7" : version.to_i
147-
expect(resource.dcv_package).to eq("nice-dcv-#{dcv_version}-el#{dcv_platform_version}-#{dcv_url_arch}")
146+
dcv_platform_version = platform == "amazon" ? "7" : version.to_i
147+
dcv_platform_version_pkg = platform == "amazon" ? "amzn2" : "el" + version
148+
expect(resource.dcv_package).to eq("nice-dcv-#{dcv_version}-#{dcv_platform_version_pkg}-#{dcv_url_arch}")
148149
expect(resource.dcv_server).to eq("nice-dcv-server-#{dcv_server_version}.el#{dcv_platform_version}.#{dcv_url_arch}.rpm")
149150
expect(resource.xdcv).to eq("nice-xdcv-#{xdcv_version}.el#{dcv_platform_version}.#{dcv_url_arch}.rpm")
150151
expect(resource.dcv_web_viewer).to eq("nice-dcv-web-viewer-#{dcv_webviewer_version}.el#{dcv_platform_version}.#{dcv_url_arch}.rpm")
@@ -450,15 +451,15 @@ def self.nothing(chef_run)
450451

451452
it 'sets up dcv authenticator group' do
452453
is_expected.to create_group(authenticator_group).with(
453-
comment: 'NICE DCV External Authenticator group',
454+
comment: 'Amazon DCV External Authenticator group',
454455
gid: authenticator_group_id,
455456
system: true
456457
)
457458
end
458459

459460
it 'sets up dcv authenticator user' do
460461
is_expected.to create_user(authenticator_user).with(
461-
comment: 'NICE DCV External Authenticator user',
462+
comment: 'Amazon DCV External Authenticator user',
462463
gid: authenticator_group_id,
463464
uid: authenticator_user_id,
464465
manage_home: true,
@@ -884,7 +885,7 @@ def self.nothing(chef_run)
884885
)
885886
end
886887

887-
it 'starts NICE DCV server' do
888+
it 'starts Amazon DCV server' do
888889
is_expected.to enable_service('dcvserver').with_action(%i(enable start))
889890
end
890891
end

0 commit comments

Comments
 (0)