diff --git a/cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_ubuntu_common.rb b/cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_ubuntu_common.rb index 4c490468f..476847009 100644 --- a/cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_ubuntu_common.rb +++ b/cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_ubuntu_common.rb @@ -45,11 +45,13 @@ def pre_install code <<-PREREQ set -e DEBIAN_FRONTEND=noninteractive + NEEDRESTART_MODE=l apt -y install whoopsie apt -y install ubuntu-desktop && apt -y install mesa-utils || (dpkg --configure -a && exit 1) apt -y purge ifupdown wget https://d1uj6qtbmh3dt5.cloudfront.net/NICE-GPG-KEY gpg --import NICE-GPG-KEY + sudo snap restart amazon-ssm-agent PREREQ retries 10 retry_delay 5 diff --git a/cookbooks/aws-parallelcluster-platform/spec/unit/resources/dcv_spec.rb b/cookbooks/aws-parallelcluster-platform/spec/unit/resources/dcv_spec.rb index 2ca8cb6d0..904ba2c31 100644 --- a/cookbooks/aws-parallelcluster-platform/spec/unit/resources/dcv_spec.rb +++ b/cookbooks/aws-parallelcluster-platform/spec/unit/resources/dcv_spec.rb @@ -472,6 +472,7 @@ def self.nothing(chef_run) when 'ubuntu' is_expected.to periodic_apt_update('') is_expected.to run_bash('install pre-req').with_cwd(Chef::Config[:file_cache_path]).with_retries(10).with_retry_delay(5) + .with_code(/NEEDRESTART_MODE=l/) .with_code(/apt -y install whoopsie/) .with_code(/apt -y install ubuntu-desktop && apt -y install mesa-utils || (dpkg --configure -a && exit 1)/) .with_code(/apt -y purge ifupdown/)