Skip to content

Commit 7a14f5e

Browse files
committed
[BuildImage] Prevent service restarts during installation of ubuntu-desktop, required by DCV, to avoid SSM agent connecgtivity issue.
In particular: * Add NEEDRESTART_MODE=l environment variable to suppress needrestart prompts during installation
1 parent 67bb15a commit 7a14f5e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def pre_install
4545
code <<-PREREQ
4646
set -e
4747
DEBIAN_FRONTEND=noninteractive
48+
NEEDRESTART_MODE=l
4849
apt -y install whoopsie
4950
apt -y install ubuntu-desktop && apt -y install mesa-utils || (dpkg --configure -a && exit 1)
5051
apt -y purge ifupdown

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,9 @@ def self.nothing(chef_run)
472472
when 'ubuntu'
473473
is_expected.to periodic_apt_update('')
474474
is_expected.to run_bash('install pre-req').with_cwd(Chef::Config[:file_cache_path]).with_retries(10).with_retry_delay(5)
475+
.with_code(/NEEDRESTART_MODE=l/)
475476
.with_code(/apt -y install whoopsie/)
476-
.with_code(/apt -y install ubuntu-desktop && apt -y install mesa-utils || (dpkg --configure -a && exit 1)/)
477+
.with_code(/apt -y install ubuntu-desktop && apt -y install mesa-utils || \(dpkg --configure -a && exit 1\)/)
477478
.with_code(/apt -y purge ifupdown/)
478479
.with_code(%r{wget https://d1uj6qtbmh3dt5.cloudfront.net/NICE-GPG-KEY})
479480
when 'amazon'

0 commit comments

Comments
 (0)