EuroLinux / cloud-images-rfc

This repository contains Requests for Change in EuroLinux made cloud images.
https://app.vagrantup.com/eurolinux-vagrant
9 stars 0 forks source link

[BUG] CentOS Linux 6.10 - set up Vault repos #4

Closed bocekm closed 3 years ago

bocekm commented 3 years ago

Describe the bug The CentOS 6.10 box uses non-functioning repos. Since CentOS 6 has been retired, the original standard repos has been archived in the Vault (https://vault.centos.org/6.10/).

Cloud Image Vagrant, libvirt, eurolinux-vagrant/centos-6 box version 6.10.19

To Reproduce

  1. Vagrantfile:
    Vagrant.configure("2") do |config|
    config.vm.box = "eurolinux-vagrant/centos-6"
    end
  2. vagrant up
  3. See error:
    
    ==> default: Installing rsync to the VM...
    <snip>
    YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
    Eg. Invalid release/repo/arch combination/
    removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt

Stderr from the command: Error: Cannot find a valid baseurl for repo: base


**Expected behavior**
The box starts up and I am able to install packages through yum.

**Additional context**
The original CentOS repos need to be edited for example using these commands to use the Vault:

sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Base.repo sed -i 's/^#baseurl.*$/baseurl=http:\/\/vault.centos.org\/6.10\/os\/x86_64/g' /etc/yum.repos.d/CentOS-Base.repo

AlexBaranowski commented 3 years ago

Hi,

We actually stopped producing Enterprise Linuxes 6 images because it hit EOL, but this last fix would be nice :).

I will fix that shortly and let you notice.

Bests, Alex

bocekm commented 3 years ago

Thanks a lot. I don't know how would I workaround it since the box fails to start up before we can run any Ansible playbooks to fix the repos.

AlexBaranowski commented 3 years ago

Hi,

The new version https://app.vagrantup.com/eurolinux-vagrant/boxes/centos-6 was pushed.

It works :).

Please remember about removing previous box with vagrant box remove eurolinux-vagrant/centos-6 .

Tip:

I was able to get to previous broken vagrant machine when during bootup you press ctrl + c during "waiting for domain to get an IP address..."

==> default: Creating shared folders metadata...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
^C==> default: Waiting for cleanup before exiting...
^C==> default: Exiting immediately, without cleanup!
 ✘ ~/V/centos-tmp > vagrant ssh
This box was generated by EuroLinux

Any suggestions are welcome at https://github.com/EuroLinux/cloud-images-rfc/

Happy using.
To delete this message use:
echo '' > /etc/motd
[vagrant@localhost ~]$ 

I'm closing the issue. Thanks for reporting this problem 👍🏼.

bocekm commented 3 years ago

Awesome, thank you!