zyga / vagrant-desktop-images

Ubuntu Desktop images for Vagrant
38 stars 14 forks source link

Puppet provisioning hangs #9

Open seshendra opened 10 years ago

seshendra commented 10 years ago

Puppet provisioner hangs at screen_saver settings for ever

Notice: Compiled catalog for vagrant-ubuntu-trusty-64 in environment production in 0.25 seconds
Notice: /Stage[main]/Base/File[apt sources.list]/content: content changed '{md5}11530579b25f7d0718cb4baa0f45f457'
Notice: /Stage[main]/Grub/File[grub configuration]/content: content changed '{md5}24684ce5e87dbef5958a2f62b91396d
Notice: /Stage[main]/Base/Exec[apt-get update]/returns: executed successfully
Notice: /Stage[main]/Base/Exec[apt-get dist-upgrade]/returns: executed successfully
Notice: /Stage[main]/Grub/Exec[update-grub]/returns: executed successfully
Notice: /Stage[main]/Screensaver_settings/Package[dconf-tools]/ensure: ensure changed 'purged' to 'present'

It doesn't go beyond the above point.

vagrant version 1.5.4 virtualbox 4.3.10 Windows 7 I'm trying to build the trusty-desktop-amd64.box.

Any help troubleshooting/resolving this will be greatly appreciated, and thanks a lot for putting together this project. Exactly what I need at this momment.

zyga commented 10 years ago

That process does take a while but it should continue. You are probably downloading packages when that is happening. I haven't tried building the images on Windows 7 yet but I'm sure it will work just as well. Give it a while to finish and monitor your network usage (you should see constant downloads as packages are being fetched).

zyga commented 10 years ago

I just gave it a quick spin on Windows 8.1. One thing it does fail at is github's client default settings which pulls various text files as \r\n windows newline encoding. Sadly those files should be unmodified and treated as binary. I'll see if I can fix that but I don't know how just yet.

seshendra commented 10 years ago

@zyga - Thank you! Seems like the unity desktop was taking a while and to make sure things are running, I added all the package installs to a shell provisioner ahead of puppet.

zyga commented 10 years ago

@seshendra Hmm. You should not need to install that (all of the things should have the right dependencies). Anyway, I'm eager to know if that eventually worked for you.

seshendra commented 10 years ago

@zyga - Yes that worked for me almost instantly. In fact it has completed much faster (less than 20 min).

I'm guessing there could be a race condition in terms of package installation across the puppet classes. One waiting for another to obtain a dpkg lock.

diimdeep commented 10 years ago

It some point I thought it hang but then it completed but in 878 seconds Vagrant 1.5.4 VBox 4.3.10 OS X 10.9.4

zyga commented 10 years ago

Hey.

To anyone that gets this to hang. Can you tell me what happens when you set VAGRANT_GUI=1 in the environment before starting the process?

$ export VAGRANT_GUI=1 $ vagrant up precise-desktop-i386

What happens in both places (attach logs if possible)

zyga commented 10 years ago

For me it works but I always use apt-cacher-ng to get fast downloads, maybe that is the issue

zyga commented 10 years ago

I just reproduced that here. The odd thing is that it did work yesterday without me really changing anything in between.

Is puppet just busted? Should I just go back to shell provisioning and do away with the fancy stuff?

2014-08-04 20:52 GMT+02:00 Dmitry Wolf notifications@github.com:

hangs for me too Vagrant 1.5.4 VBox 4.3.10 OS X 10.9.4

— Reply to this email directly or view it on GitHub https://github.com/zyga/vagrant-desktop-images/issues/9#issuecomment-51101400 .

snowch commented 9 years ago

If you turn on puppet debugging in the Vagrantfile:

  # Provision the machine with puppet
  config.vm.provision "puppet" do |puppet|
    puppet.options = "--verbose --debug"
  end

You can see that the hang is after dconf-tools:

...
==> trusty-desktop-amd64: Notice: /Stage[main]/Grub/Exec[update-grub]/returns: executed successfully
==> trusty-desktop-amd64: Debug: /Stage[main]/Grub/Exec[update-grub]: The container Class[Grub] will propagate my refresh event
==> trusty-desktop-amd64: Debug: Prefetching apt resources for package
==> trusty-desktop-amd64: Debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n''
==> trusty-desktop-amd64: Debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n' dconf-tools'
==> trusty-desktop-amd64: Debug: Executing '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install dconf-tools'
==> trusty-desktop-amd64: Notice: /Stage[main]/Screensaver_settings/Package[dconf-tools]/ensure: ensure changed 'purged' to 'present'
==> trusty-desktop-amd64: Debug: /Stage[main]/Screensaver_settings/Package[dconf-tools]: The container Class[Screensaver_settings] will propagate my refresh event
==> trusty-desktop-amd64: Debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n' ubuntu-desktop'
==> trusty-desktop-amd64: Debug: Executing '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install ubuntu-desktop'

vagrant ssh into the box and you should see activity:

sudo watch ls -lh /var/cache/apt/archives/partial/

You should see the file size increasing of the file currently being installed by apt while the desktop is being installed. After a while there won't be a file and you can track progress with:

sudo tail -f /var/log/dpkg.log 

Eventually, puppet will finish.