diff --git a/lib/simp/beaker_helpers.rb b/lib/simp/beaker_helpers.rb index 90b3404..7dc2712 100644 --- a/lib/simp/beaker_helpers.rb +++ b/lib/simp/beaker_helpers.rb @@ -1555,17 +1555,28 @@ def install_simp_repos(suts, disable = []) os = fact_on(sut, 'os.name') release = fact_on(sut, 'os.release.major') + real_release = release.to_i # Work around Amazon 2 compatibility if (( os == 'Amazon' ) && ( "#{release}" == '2' )) release = '7' end - install_package_unless_present_on( - sut, - 'simp-release-community', - "https://download.simp-project.com/simp-release-community.el#{release}.rpm" - ) + begin + install_package_unless_present_on( + sut, + 'simp-release-community', + "https://download.simp-project.com/simp-release-community.el#{release}.rpm" + ) + rescue + # Hack to temporarily support new OS releases + release = (release.to_i - 1).to_s + if release.to_i - real_release > 3 + retry + else + raise "Unsupported OS #{os} #{real_release}" + end + end # TODO: Remove this hack-around when there's a version for AL2 if ( os == 'Amazon' )