Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 12.04 unattended-upgrades -> kernel upgrade -> no longer able to mount shared folders on next reboot #516

Closed
kylegibson opened this issue Dec 29, 2015 · 6 comments

Comments

@kylegibson
Copy link

If you leave a freshly provision 12.04 box on overnight, the kernel will be upgraded. The next time you halt/up, you'll encounter the following error:

vagrant up
Bringing machine 'machine' up with 'virtualbox' provider...
...
==> machine: Mounting shared folders...
    machine: /vagrant => /home/kyle/testing



Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

The error output from the last command was:

stdin: is not a tty
/sbin/mount.vboxsf: mounting failed with the error: No such device

The upgrade occurs as a result of unattended-upgrades bein run when /etc/cron.daily/apt is run. Rather than waiting overnight to test this behavior, you can run it directly as root:

(note, you may want to edit /etc/cron.daily/apt to comment out random_sleep so the process initiates immediately)

root@vagrant:/home/vagrant# ll /lib/modules/
total 16
drwxr-xr-x  4 root root 4096 Dec 29 02:17 ./
drwxr-xr-x 20 root root 4096 Dec 29 02:17 ../
drwxr-xr-x  5 root root 4096 Dec 23 16:53 3.13.0-32-generic/
root@vagrant:/home/vagrant# /etc/cron.daily/apt
root@vagrant:/home/vagrant# uname -r
3.13.0-32-generic
root@vagrant:/home/vagrant# ll /lib/modules/
total 16
drwxr-xr-x  4 root root 4096 Dec 29 02:17 ./
drwxr-xr-x 20 root root 4096 Dec 29 02:17 ../
drwxr-xr-x  5 root root 4096 Dec 23 16:53 3.13.0-32-generic/
drwxr-xr-x  4 root root 4096 Dec 29 02:17 3.13.0-74-generic/

The following sequence works correctly provided the cron task doesn't occur between steps 1 and 2.

  1. Provision machine
  2. vagrant halt
  3. vagrant up
vagrant@vagrant:~$ uname -a
Linux vagrant 3.13.0-32-generic #57~precise1-Ubuntu SMP Tue Jul 15 03:51:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
vagrant@vagrant:~$ ll /lib/modules/
total 12
drwxr-xr-x  3 root root 4096 Dec 23 16:49 ./
drwxr-xr-x 19 root root 4096 Dec 23 16:53 ../
drwxr-xr-x  5 root root 4096 Dec 23 16:53 3.13.0-32-generic/
@rickard-von-essen
Copy link
Collaborator

I guess this is directly related to #510

@cheeseplus
Copy link
Contributor

What version of box was this seen with?

@kylegibson
Copy link
Author

The box that was available for download as of yesterday. This has been a problem for several weeks though. It was only yesterday that I had time to actually look into the issue. Each time I've made a point to remove the box and download a fresh one, just in case whatever was causing the problem was fixed upstream.

Is there a way I can determine the precise version of the box I have?

@cheeseplus
Copy link
Contributor

To determine your verison of box

  1. If you're using the boxes via Atlas (ex. bento/ubuntu-15.04) this is easy
    vagrant box list will show the version # right next to the provider
vagrant box list
bento/ubuntu-15.04   (vmware_desktop, 2.2.3)
  1. From the vagrant box itself
cat /etc/bento-metadata.json
{
  "name": "ubuntu-15.04",
  "version": "2.2.3",
  "build_timestamp": "20151223195708",
  "git_revision": "3adda378c86804d87f3f658f796b1eeaab0f0afa_dirty",
  "box_basename": "ubuntu-15.04-2.2.3.git.3adda378c86804d87f3f658f796b1eeaab0f0afa_dirty",
  "template": "ubuntu-15.04-amd64"

@kylegibson
Copy link
Author

{
  "name": "ubuntu-12.04",
  "version": "2.2.3",
  "build_timestamp": "20151223164655",
  "git_revision": "3adda378c86804d87f3f658f796b1eeaab0f0afa_dirty",
  "box_basename": "ubuntu-12.04-2.2.3.git.3adda378c86804d87f3f658f796b1eeaab0f0afa_dirty",
  "template": "ubuntu-12.04-amd64"
}

@cheeseplus
Copy link
Contributor

This condition should be fixed in latest via a combination of #510 and disabling the release upgrader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants