From 466a7f45350bd50a1362441dc445eb7b4a84f88e Mon Sep 17 00:00:00 2001 From: Jossemar Cordero <95245208+jossemargt-3pillar@users.noreply.github.com> Date: Tue, 8 Feb 2022 10:03:19 -0600 Subject: [PATCH] Update CentOS 8 smoke vm's with vault repositories (#5092) Update CentOS 8 smoke vm's with vault repositories Problem: CentOS 8 reached its EOL alongside its public mirrors, making all the smoke test fail at provisioning time. Solution: Point all the CentOS repositories to vault. Signed-off-by: Jonnatan Jossemar Cordero --- tests/vagrant/install/centos-8/Vagrantfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/vagrant/install/centos-8/Vagrantfile b/tests/vagrant/install/centos-8/Vagrantfile index 3f1d792170..e3bec9dad3 100644 --- a/tests/vagrant/install/centos-8/Vagrantfile +++ b/tests/vagrant/install/centos-8/Vagrantfile @@ -14,6 +14,14 @@ Vagrant.configure("2") do |config| config.vm.define 'install-centos-8', primary: true do |test| test.vm.hostname = 'smoke' + test.vm.provision 'centos8-repos-point2vault', type: 'shell', run: 'once' do |sh| + sh.env = { :PATH => '/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin' } + sh.inline = <<~'SHELL' + #!/bin/sh + find /etc/yum.repos.d -type f -name '*.repo' -exec \ + sed -i -e '/mirrorlist.*/d' -e 's%#baseurl=http://mirror.centos.org%baseurl=http://vault.centos.org%g' {} \; + SHELL + end test.vm.provision 'k3s-upload', type: 'file', run: 'always', source: ENV['TEST_INSTALL_SH'], destination: 'install.sh' test.vm.provision 'k3s-install', type: 'k3s', run: 'once' do |k3s| k3s.installer_url = 'file:///home/vagrant/install.sh'