in cookbooks/aws-parallelcluster-entrypoints/libraries/entrypoints.rb [3:19]
def ami_bootstrapped?
version = ''
bootstrapped_file = '/opt/parallelcluster/.bootstrapped'
current_version = "aws-parallelcluster-cookbook-#{node['cluster']['parallelcluster-cookbook-version']}"
if ::File.exist?(bootstrapped_file)
version = IO.read(bootstrapped_file).chomp
Chef::Log.info("Detected bootstrap file #{version}")
if version != current_version
raise "This AMI was created with #{version}, but is trying to be used with #{current_version}. " \
"Please either use an AMI created with #{current_version} or change your ParallelCluster to #{version}"
end
end
version != '' && !(node['cluster']['skip_install_recipes'] == 'no' || node['cluster']['skip_install_recipes'] == false)
end