rmatinata / multiarch-containers

Deploy a containers build environment, capable of producing containers for multiple architectures
MIT License
0 stars 0 forks source link

Missing containers. #2

Open sowani opened 8 years ago

sowani commented 8 years ago

I am trying multiarch-containers on Ubuntu 14.04 on x86_64 by following instructions in README.md file (log file attached). After this I could not find any containers created. Is there any way I can debug this? Thanks! log.txt

rmatinata commented 8 years ago

@sowani i haven't extensively tested with Ubuntu yet, but I intend in the next day or so... Meanwhile, can you try the default Vagrant file that pulls CentOS ?

sowani commented 8 years ago

Tried using default Vagrantfile. For this I used CentOS 7 box obtained from following source: https://atlas.hashicorp.com/centos/boxes/7/versions/1605.01/providers/virtualbox.box However, vagrant up threw error and exited (log attached). vagrant_error.txt

rmatinata commented 8 years ago

@sowani seems to be some sort o vagrant problem, maybe you have garbage in this folder ? May I suggest that you start from scratch on a clean folder, as instructed in the README ?

sowani commented 8 years ago

@rmatinata I tried setting up and running Vagrantfile on a fresh x86_64 VM (running Ubuntu 15.04). I obtained the Vagrantfile using the curl command as specified in README. This definitely helped. The only edit required for Vagrantfile was to enable an IP. This is something which I learnt in my earlier attempts as I used to get following message:

`# vagrant up Bringing machine 'default' up with 'virtualbox' provider... There are errors in the configuration of this machine. Please fix the following errors and try again:

vm:

So here the diff of Vagrantfile:

`*\ Vagrantfile.org 2016-07-01 11:42:51.668376783 +0530 --- Vagrantfile 2016-07-01 10:47:16.744376783 +0530


* 26,33 **

# Create a private network, which allows host-only access to the machine
# using a specific IP.

! # config.vm.network "private_network", ip: "192.168.33.10" ! config.vm.network "private_network", type: "dhcp"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on

--- 26,33 ----

# Create a private network, which allows host-only access to the machine
# using a specific IP.

! config.vm.network "private_network", ip: "192.168.33.10" ! # config.vm.network "private_network", type: "dhcp"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on`

However, the VM entered an invalid state and I couldn't recover it with second "vagrant up". Also tried "vagrant destroy" and then recreate it again - didn't help. Here is the error snippet:

`==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key The guest machine entered an invalid state while waiting for it to boot. Valid states are 'starting, running'. The machine is in the 'gurumeditation' state. Please verify everything is configured properly and try again.

If the provider you're using has a GUI that comes with it, it is often helpful to open that and watch the machine, since the GUI often has more helpful error messages than Vagrant can retrieve. For example, if you're using VirtualBox, run vagrant up while the VirtualBox GUI is open.`

sowani commented 8 years ago

Also tried tweaks suggested at https://www.digitalocean.com/community/questions/vagrant-and-virtualbox-gurumeditation-problem but faced the same time-out issue that they were getting.

sowani commented 8 years ago

@rmatinata The issue does not seem directly related to multiarch-containers and/or it's configuration. I tried the Vagrant tutorial from their site and that too runs into very same issue. I have started wondering if this could be because I am trying this on a VM (i.e. if this is VM-on-VM situation) and if that is contributing to this error.

sowani commented 8 years ago

@rmatinata

I was trying a simple vagrantfile example, where I ended up getting error:

==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'gurumeditation' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

Searching a bit on Internet gave me following pointer: https://www.virtualbox.org/ticket/10199

I tried setting these parameters on the box:

vboxmanage modifyvm --hwvirtex off
vboxmanage modifyvm --vtxvpid off

Starting VM using "vagrant up" did not throw any error, but started giving timeouts:

==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...

The "guru meditation" issue seems to be associated with virtualbox.

While checking up vagrant issues I came across following: https://github.com/mitchellh/vagrant/issues/7259

This thread gives a link to an issue in virtualbox: https://www.virtualbox.org/ticket/15345

which is marked as duplicate of: https://www.virtualbox.org/ticket/15317

This issue has been fixed in Virtualbox 5.0.20. There appears to be a dependency in multiarch-containers on virtualbox 4.3.x (4.3.36 is the one being used in my case). I tried to use virtualbox 5.x, but it did not work because of version dependency. Is there any way of making changes to multiarch-containers to use latest virtualbox?

sowani commented 8 years ago

P.S. to my earlier comment - I upgraded vagrant and virtualbox to the latest versions (1.8.4 and 5.0.24 respectively) and tried. However this time, "Booting VM" appears to be silently hanging. :(

rmatinata commented 8 years ago

@sowani running nested virtualization can be challenging a few times... What I suggest you doing is to simply try this on your laptop (assuming your laptop is virtualization capable), which would correspond to running bare-metal.

Additionally, you also have the option of skipping the Vagrant part and directly running the ansible playbook, if you have a CentOS VM (it might work on an Ubuntu VM as well). Take a look at this README section

sowani commented 8 years ago

@rmatinata As the containers are not getting created using ansible, I thought I will check the vagrant approach also. However none seems to be working for me. May be it's because of two reasons - 1. I am using VM not the bare metal, and 2. my VM is Ubuntu not CentOS.

Unfortunately, I don't have access to any bare metal Linux machine - all I can access are VMs (specifically Ubuntu and RHEL). On these VMs I have been using Docker (in other scenarios) to create containers, so that the Docker is working correctly on these VMs. I am not very well conversant with using ansible, but I will try to study and debug how the playbook in multiarch-containers is working. Thanks!

sowani commented 8 years ago

@rmatinata Finally SUCCESS! :) I took the ansible_playbook approach. It did not create any containers. So I manually executed /tmp/wrk_dir/arch/build.sh for ppc64le. This indicated that it was not able to pull the image from docker.io (though I have set HTTP_PROXY env var, it didn't work). So I did required configuration (https://docs.docker.com/engine/admin/systemd/#http-proxy). After this I again tried the build.sh script with ppc64le and lo! I got the docker image created!

I am using Ubuntu 15.04 VM.

Thanks very much for patiently receiving all my ramblings so far and your active support!