Skip Job Cost Calulations on Non-Cloud Platforms 42/66642/1
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Wed, 27 Jan 2021 20:05:06 +0000 (12:05 -0800)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Wed, 27 Jan 2021 20:13:15 +0000 (12:13 -0800)
commit44f406cbb141c28a33aae936baa6c0d90c844060
treefb4707d95de6e902d29dad0eaad2e13ebc164e08
parent4db0ef085ad9af609f0f7941dee03b156923a348
Skip Job Cost Calulations on Non-Cloud Platforms

When 'job-cost.sh' is ran on a VM not initialized with cloud-init, or
running in OpenStack, attempts to read '/run/cloud-init/result.json'
will fail causing the job to become unsable.

This change adds a check for any relevant files to the beginning of
'job-cost.sh' in order to skip the calculation on VMs not running on
either AWS or OpenStack.

Change-Id: I878adee1ba3ceeffa574a1b1c7ae103811344123
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
releasenotes/notes/fix-job-cost-18fd129b9713c5dd.yaml [new file with mode: 0644]
shell/job-cost.sh