Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Debian-7.0-b4-i386-netboot fails "Checking shared folders" #459

Closed
rvavruch opened this Issue Jan 2, 2013 · 24 comments

Comments

Projects
None yet
8 participants

rvavruch commented Jan 2, 2013

Running the following command fails on "Checking shared folders":

$ vagrant basebox validate 'debian-testing'
Feature: veewee box validation
  As a valid veewee box
  I need to comply to a set of rules

  @vmfusion @virtualbox @kvm @parallels
  Scenario: Valid definition                              # /home/krokodil/veewee/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:6
    Given a veeweebox was build                           # validation/features/steps/veewee_steps.rb:3
    And I run "whoami" over ssh                           # validation/features/steps/veewee_steps.rb:16
    Then I should see the provided username in the output # validation/features/steps/veewee_steps.rb:20

  @vmfusion @virtualbox @kvm @parallels
  Scenario: Checking sudo                  # /home/krokodil/veewee/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:12
    Given a veeweebox was build            # validation/features/steps/veewee_steps.rb:3
    And I sudorun "whoami" over ssh        # validation/features/steps/veewee_steps.rb:11
    Then I should see "root" in the output # validation/features/steps/veewee_steps.rb:24

  @vmfusion @virtualbox @kvm @parallels
  Scenario: Checking ruby                                                                   # /home/krokodil/veewee/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:18
    Given a veeweebox was build                                                             # validation/features/steps/veewee_steps.rb:3
    And I run ". /etc/profile ;ruby --version 2> /dev/null 1> /dev/null;  echo $?" over ssh # validation/features/steps/veewee_steps.rb:16
    Then I should see "0" in the output                                                     # validation/features/steps/veewee_steps.rb:24

  @vmfusion @virtualbox @kvm @parallels
  Scenario: Checking gem                                                                   # /home/krokodil/veewee/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:24
    Given a veeweebox was build                                                            # validation/features/steps/veewee_steps.rb:3
    And I run ". /etc/profile; gem --version 2> /dev/null 1> /dev/null ; echo $?" over ssh # validation/features/steps/veewee_steps.rb:16
    Then I should see "0" in the output                                                    # validation/features/steps/veewee_steps.rb:24

  @chef
  Scenario: Checking chef                                                                        # /home/krokodil/veewee/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:30
    Given a veeweebox was build                                                                  # validation/features/steps/veewee_steps.rb:3
    And I run ". /etc/profile ;chef-client --version 2> /dev/null 1>/dev/null; echo $?" over ssh # validation/features/steps/veewee_steps.rb:16
    Then I should see "0" in the output                                                          # validation/features/steps/veewee_steps.rb:24

  @puppet
  Scenario: Checking puppet                                                                  # /home/krokodil/veewee/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:36
    Given a veeweebox was build                                                              # validation/features/steps/veewee_steps.rb:3
    And I run ". /etc/profile ; puppet --version 2> /dev/null 1>/dev/null; echo $?" over ssh # validation/features/steps/veewee_steps.rb:16
    Then I should see "0" in the output                                                      # validation/features/steps/veewee_steps.rb:24

  @vagrant
  Scenario: Checking shared folders                     # /home/krokodil/veewee/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:42
    Given a veeweebox was build                         # validation/features/steps/veewee_steps.rb:3
    And I run "mount|grep veewee-validation" over ssh   # validation/features/steps/veewee_steps.rb:16
    Then I should see "veewee-validation" in the output # validation/features/steps/veewee_steps.rb:24
      expected: /veewee-validation/
           got: "" (using =~)
      Diff:
      @@ -1,2 +1,2 @@
      -/veewee-validation/
      +""
       (RSpec::Expectations::ExpectationNotMetError)
      ./validation/features/steps/veewee_steps.rb:25:in `/^I should see "([^\"]*)" in the output$/'
      ./lib/veewee/provider/core/box/../../../../../validation/veewee.feature:45:in `Then I should see "veewee-validation" in the output'

Failing Scenarios:
cucumber /home/krokodil/veewee/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:42 # Scenario: Checking shared folders

7 scenarios (1 failed, 6 passed)
21 steps (1 failed, 20 passed)
1m41.878s
Contributor

igama commented Jan 3, 2013

Also have the same issue

Owner

jedi4ever commented Jan 3, 2013

@igama @rvavruch can you provide me with the output of the postinstall run?

I'm wondering if virtualbox got installed correctly ?

Contributor

igama commented Jan 3, 2013

I'll run it again, will give the output later ;)

Contributor

igama commented Jan 3, 2013

I just tested with Ubuntu 12.10 template and it worked. Tomorrow i'll try and debug what changed in Debian7 thats affecting the current scripts.

rvavruch commented Jan 4, 2013

@jedi4ever I'm sorry I'm quite new to this. What steps do I take to get the
output of the postinstall run?

I have been using the veewee created box in Vagrant to run a basic LAMP
installation without any problems so far, but the validation still does not
pass.

On 3 January 2013 18:37, Patrick Debois notifications@github.com wrote:

@igama https://github.com/igama @rvavruch https://github.com/rvavruchcan you provide me with the output of the postinstall run?

I'm wondering if virtualbox got installed correctly ?


Reply to this email directly or view it on GitHubhttps://github.com/jedi4ever/veewee/issues/459#issuecomment-11850314.

Owner

jedi4ever commented Jan 4, 2013

No problem @rvavruch. I'll explain:

when you run veewee it:

  • assembles the vm
  • boots the vm
  • performs a preseed config

and then ssh'es in to perform a set of scripts.
The output of this ssh should be in your terminal when you execute veewee.
Simply put post me the output of the veewee command somewhere.

gracias

On 04/01/13 07:59, rvavruch wrote:

@jedi4ever I'm sorry I'm quite new to this. What steps do I take to
get the
output of the postinstall run?

I have been using the veewee created box in Vagrant to run a basic LAMP
installation without any problems so far, but the validation still
does not
pass.

On 3 January 2013 18:37, Patrick Debois notifications@github.com wrote:

@igama https://github.com/igama @rvavruch
https://github.com/rvavruchcan you provide me with the output of the
postinstall run?

I'm wondering if virtualbox got installed correctly ?


Reply to this email directly or view it on
GitHubhttps://github.com/jedi4ever/veewee/issues/459#issuecomment-11850314.


Reply to this email directly or view it on GitHub
#459 (comment).

rvavruch commented Jan 4, 2013

I've uploaded the build and validate outputs here:
https://gist.github.com/4453094

Some notes (let me know if I should create separate issues for these):

  • When the log says:
    [vagrant] Starting a webserver :7122

There is a point where it gets stuck on a config screen (shown in the Virtual Box window) that says:

[!!] Configure the keyboard

Keymap to use:

American English
..

You have to press Enter there otherwise it does not continue (I know because I left it running overnight).

  • I was reminded that later while setting up LAMP in Vagrant I ran aptitude update && aptitude dist-upgrade which gave me a locale error which I fixed using this:

http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue

Owner

jedi4ever commented Jan 4, 2013

Based on the output - vbox did not get installed correctly indeed

[debian-testing] Executing command: echo 'vagrant'|sudo -S sh
'./virtualbox.sh'

[debian-testing] ./virtualbox.sh: 3: ./virtualbox.sh:

[debian-testing] /etc/init.d/virtualbox-ose-guest-utils: not found

[debian-testing] Error: Module vboxguest is not currently loaded

Probably some change in the newer version of Debian.

On 04/01/13 15:54, rvavruch wrote:

I've uploaded the build and validate outputs here:
https://gist.github.com/4453094

Some notes (let me know if I should create separate issues for these):

  • When the log says: [vagrant] Starting a webserver :7122

There is a point where it gets stuck on a config screen (shown in the
Virtual Box window) that says:

[!!] Configure the keyboard

Keymap to use:

American English
..

You have to press Enter there otherwise it does not continue (I know
because I left it running overnight).

  • I was reminded that later while setting up LAMP in Vagrant I ran
    aptitude update && aptitude dist-upgrade which gave me a locale
    error which I fixed using this:

http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue


Reply to this email directly or view it on GitHub
#459 (comment).

Contributor

igama commented Jan 4, 2013

Ignore my previous comment. The Debian OSE Guest Additions are not installed because there is a rule on the preseed.cfg.

Contributor

igama commented Jan 7, 2013

@rvavruch I believe your issue is related to a kernel upgrade. Since the Debian7 install scripts don't have DKMS and linux-headers installed by the end, when you do a upgrade it will not generate the new virtualbox guest additions modules.

To fix this, login in to the box and execute the following commands:

sudo apt-get install dkms linux-headers-$(uname -r) build-essential
wget http://download.virtualbox.org/virtualbox/4.2.6/VBoxGuestAdditions_4.2.6.iso
mount -o loop VBoxGuestAdditions_4.2.6.iso /mnt
yes|sh /mnt/VBoxLinuxAdditions.run
umount /mnt

reboot the virtual machine and you should have no more issues :)

Owner

jedi4ever commented Jan 7, 2013

@igama you're right - I recently added dkms to the Centos 6.3 templates too - be great if you could at it to the debian templates too.

Contributor

igama commented Jan 7, 2013

@jedi4ever sure :)

rvavruch commented Jan 8, 2013

@igama How do I login to the box? I tried:

vagrant basebox ssh 'debian-testing'

but got:

ssh_exchange_identification: Connection closed by remote host

as response. Is there another method? Or should I do this once I have added the basebox to Vagrant?

Owner

jedi4ever commented Jan 9, 2013

If the ssh doensn't work, you might want to start Virtualbox and login via the console ?

try root/vagrant, or vagrant/vagrant to login

I managed to ssh in using vagrant ssh. Followed the instructions above, but it still does not validate. Should I create a veewee box completely from scratch?

Contributor

brianbianco commented Feb 1, 2013

Looks like the same issue is occuring with the Debian-6.0.6-amd64-netboot' template.

bender:veewee bbianco$ vagrant basebox validate 'debian60'
Feature: veewee box validation
  As a valid veewee box
  I need to comply to a set of rules

  @vmfusion @virtualbox @kvm @parallels
  Scenario: Valid definition                              # /Users/bbianco/.vagrant.d/gems/gems/veewee-0.3.7/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:6
    Given a veeweebox was build                           # veewee-0.3.7/validation/features/steps/veewee_steps.rb:3
    And I run "whoami" over ssh                           # veewee-0.3.7/validation/features/steps/veewee_steps.rb:16
    Then I should see the provided username in the output # veewee-0.3.7/validation/features/steps/veewee_steps.rb:20

  @vmfusion @virtualbox @kvm @parallels
  Scenario: Checking sudo                  # /Users/bbianco/.vagrant.d/gems/gems/veewee-0.3.7/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:12
    Given a veeweebox was build            # veewee-0.3.7/validation/features/steps/veewee_steps.rb:3
    And I sudorun "whoami" over ssh        # veewee-0.3.7/validation/features/steps/veewee_steps.rb:11
    Then I should see "root" in the output # veewee-0.3.7/validation/features/steps/veewee_steps.rb:24

  @vmfusion @virtualbox @kvm @parallels
  Scenario: Checking ruby                                                                   # /Users/bbianco/.vagrant.d/gems/gems/veewee-0.3.7/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:18
    Given a veeweebox was build                                                             # veewee-0.3.7/validation/features/steps/veewee_steps.rb:3
    And I run ". /etc/profile ;ruby --version 2> /dev/null 1> /dev/null;  echo $?" over ssh # veewee-0.3.7/validation/features/steps/veewee_steps.rb:16
    Then I should see "0" in the output                                                     # veewee-0.3.7/validation/features/steps/veewee_steps.rb:24

  @vmfusion @virtualbox @kvm @parallels
  Scenario: Checking gem                                                                   # /Users/bbianco/.vagrant.d/gems/gems/veewee-0.3.7/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:24
    Given a veeweebox was build                                                            # veewee-0.3.7/validation/features/steps/veewee_steps.rb:3
    And I run ". /etc/profile; gem --version 2> /dev/null 1> /dev/null ; echo $?" over ssh # veewee-0.3.7/validation/features/steps/veewee_steps.rb:16
    Then I should see "0" in the output                                                    # veewee-0.3.7/validation/features/steps/veewee_steps.rb:24

  @chef
  Scenario: Checking chef                                                                        # /Users/bbianco/.vagrant.d/gems/gems/veewee-0.3.7/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:30
    Given a veeweebox was build                                                                  # veewee-0.3.7/validation/features/steps/veewee_steps.rb:3
    And I run ". /etc/profile ;chef-client --version 2> /dev/null 1>/dev/null; echo $?" over ssh # veewee-0.3.7/validation/features/steps/veewee_steps.rb:16
    Then I should see "0" in the output                                                          # veewee-0.3.7/validation/features/steps/veewee_steps.rb:24

  @puppet
  Scenario: Checking puppet                                                                  # /Users/bbianco/.vagrant.d/gems/gems/veewee-0.3.7/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:36
    Given a veeweebox was build                                                              # veewee-0.3.7/validation/features/steps/veewee_steps.rb:3
    And I run ". /etc/profile ; puppet --version 2> /dev/null 1>/dev/null; echo $?" over ssh # veewee-0.3.7/validation/features/steps/veewee_steps.rb:16
    Then I should see "0" in the output                                                      # veewee-0.3.7/validation/features/steps/veewee_steps.rb:24

  @vagrant
  Scenario: Checking shared folders                     # /Users/bbianco/.vagrant.d/gems/gems/veewee-0.3.7/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:42
    Given a veeweebox was build                         # veewee-0.3.7/validation/features/steps/veewee_steps.rb:3
    And I run "mount|grep veewee-validation" over ssh   # veewee-0.3.7/validation/features/steps/veewee_steps.rb:16
    Then I should see "veewee-validation" in the output # veewee-0.3.7/validation/features/steps/veewee_steps.rb:24
      expected: /veewee-validation/
           got: "" (using =~)
      Diff:
      @@ -1,2 +1,2 @@
      -/veewee-validation/
      +""
       (RSpec::Expectations::ExpectationNotMetError)

Failing Scenarios:
cucumber /Users/bbianco/.vagrant.d/gems/gems/veewee-0.3.7/lib/veewee/provider/core/box/../../../../../validation/veewee.feature:42 # Scenario: Checking shared folders

7 scenarios (1 failed, 6 passed)
21 steps (1 failed, 20 passed)
0m9.985s
Contributor

brianbianco commented Feb 1, 2013

Just to follow up on this. I fixed the debian 6.0.6 template and issued a pull request.

#526

Not really sure if this is veewee related.. I have the same problem with debian-6.0.6-64bit and virtualbox 4.2.6. I used the changes in as noted in pull request #526 but with no luck. Strange thing is that if I mount the share from within the guest there is no problem at all.

(from within the guest)
sudo mount -t vboxsf veewee-validation /mnt

The problem only occurs after installing / booting the guest. I did some digging in syslog and dmesg and found the following error (during the startup):

[7.067750] VBoxService[1315]: segfault at 0 ip (null) sp 00007f8702003638 error 14 in VBoxService[400000+99000]

I think the problem is related to guest additions and that they from some reason fail at boot and do not mount the share at boot. Can anyone check and confirm this ?

Contributor

brianbianco commented Feb 4, 2013

Yikes. Looks like I agree. I must have gotten very lucky as I ran the tests a couple times with and without the dkms module addition change. I have the same error in my dmesg log

[ 177.929709] VBoxService[10106]: segfault at 0 ip (null) sp 00007f0756f7e638 error 14 in VBoxService[400000+99000]

It does seem like at times, it will randomly decide to work.

I am running vbox 4.2.6 on mountain lion (10.8.2)

Contributor

brianbianco commented Feb 4, 2013

More info:
The vboxadd-install.log seems to indicate that the additions installed without any problem

vagrant@debian:/var/log$ cat vboxadd-install.log 
Uninstalling modules from DKMS
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxguest/4.2.6/source ->
                 /usr/src/vboxguest-4.2.6

DKMS: add Completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=2.6.32-5-amd64 -C /lib/modules/2.6.32-5-amd64/build M=/var/lib/dkms/vboxguest/4.2.6/build..........
cleaning build area....

DKMS: build Completed.

vboxguest.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-5-amd64/updates/dkms/

vboxsf.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-5-amd64/updates/dkms/

vboxvideo.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-5-amd64/updates/dkms/

depmod....

DKMS: install Completed.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

tmhpfnr commented Feb 10, 2013

It seems that the command from igama

sudo apt-get install dkms linux-headers-$(uname -r) build-essential

doesn't always works. When i log into the new machine i randomly get an abort notice, sometimes it works …

Owner

jedi4ever commented Feb 19, 2013

veewee's CI seems to indicate the same thing. Once so often this would fail.

Contributor

kiboflavin commented Feb 20, 2013

I think I figured this one out.

VboxService 4.2.6 (not sure of others) segfaults when it can't find libdbus-1.so.3. The basic install of Debian doesn't have the "libdbus-1-3" package installed.

If VboxService isn't running, shared folders aren't mounted automatically, which causes the validate test to fail.

Collaborator

mpapis commented Oct 4, 2014

this template was already removed - closing, please let me know if there is still something wrong

@mpapis mpapis closed this Oct 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment