geerlingguy / drupal-vm

A VM for Drupal development
https://www.drupalvm.com/
MIT License
1.37k stars 645 forks source link

Provisioning fails with 'gzip: stdout: No space left on device' #354

Closed robdecker closed 8 years ago

robdecker commented 8 years ago

I have updated Ansible requirements (sudo ansible-galaxy install -r provisioning/requirements.yml --force) and am trying to provision, but it is failing. I have retried a few times.

It is failing sometimes at geerlingguy.mailhog | Install sSMTP and sometimes at geerlingguy.postfix | Ensure postfix is installed (Debian). Error log follows:

failed: [drupalvm] => {"failed": true}
stderr: Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.16.0-57-generic
vmlinuz(/boot/vmlinuz-3.16.0-57-generic
) points to /boot/vmlinuz-3.16.0-57-generic
 (/boot/vmlinuz-3.16.0-57-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.16.0-57-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-57-generic /boot/vmlinuz-3.16.0-57-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.16.0-57-generic /boot/vmlinuz-3.16.0-57-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-57-generic /boot/vmlinuz-3.16.0-57-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-57-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-57-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.16.0-57-generic.postinst line 1025.
dpkg: error processing package linux-image-3.16.0-57-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.16.0-57-generic:
 linux-image-extra-3.16.0-57-generic depends on linux-image-3.16.0-57-generic; however:
  Package linux-image-3.16.0-57-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.16.0-57-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic-lts-utopic:
 linux-image-generic-lts-utopic depends on linux-image-3.16.0-57-generic; however:
  Package linux-image-3.16.0-57-generic is not configured yet.
 linux-image-generic-lts-utopic depends on linux-image-extra-3.16.0-57-generic; however:
  Package linux-image-extra-3.16.0-57-generic is not configured yet.

dpkg: error processing package linux-image-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-utopic:
 linux-generic-lts-utopic depends on linux-image-generic-lts-utopic (= 3.16.0.57.48); however:
  Package linux-image-generic-lts-utopic is not configured yet.

dpkg: error processing package linux-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-56-generic /boot/vmlinuz-3.16.0-56-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.16.0-56-generic /boot/vmlinuz-3.16.0-56-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-56-generic /boot/vmlinuz-3.16.0-56-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-56-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-56-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.16.0-56-generic (--configure):
 subprocess installed post-installation script returned error exit status 1

Postfix configuration was untouched.  If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
 * Stopping Postfix Mail Transport Agent postfix
   ...done.
 * Starting Postfix Mail Transport Agent postfix
   ...done.
Errors were encountered while processing:
 linux-image-3.16.0-57-generic
 linux-image-extra-3.16.0-57-generic
 linux-image-generic-lts-utopic
 linux-generic-lts-utopic
 linux-image-extra-3.16.0-56-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

stdout: Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  libyaml-0-2 linux-headers-3.16.0-51 linux-headers-3.16.0-51-generic
  linux-headers-3.16.0-52 linux-headers-3.16.0-52-generic
  linux-headers-3.16.0-53 linux-headers-3.16.0-53-generic
  linux-image-3.16.0-30-generic linux-image-3.16.0-51-generic
  linux-image-3.16.0-52-generic linux-image-3.16.0-53-generic
  linux-image-extra-3.16.0-30-generic linux-image-extra-3.16.0-51-generic
  linux-image-extra-3.16.0-52-generic linux-image-extra-3.16.0-53-generic
  python-crypto python-httplib2 python-jinja2 python-markupsafe
  python-paramiko python-pkg-resources python-support python-yaml sshpass
Use 'apt-get autoremove' to remove them.
Suggested packages:
  procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin
  dovecot-common postfix-cdb mail-reader postfix-doc
The following packages will be REMOVED:
  ssmtp
The following NEW packages will be installed:
  postfix
Preconfiguring packages ...
0 upgraded, 1 newly installed, 1 to remove and 85 not upgraded.
5 not fully installed or removed.
Need to get 0 B/1084 kB of archives.
After this operation, 3600 kB of additional disk space will be used.
(Reading database ... 249158 files and directories currently installed.)
Removing ssmtp (2.64-7) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Selecting previously unselected package postfix.
(Reading database ... 249140 files and directories currently installed.)
Preparing to unpack .../postfix_2.11.0-1ubuntu1_amd64.deb ...
Unpacking postfix (2.11.0-1ubuntu1) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up linux-image-3.16.0-57-generic (3.16.0-57.77~14.04.1) ...
Setting up linux-image-extra-3.16.0-56-generic (3.16.0-56.75~14.04.1) ...
Setting up postfix (2.11.0-1ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...

msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"   install 'postfix'' failed: Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.16.0-57-generic
vmlinuz(/boot/vmlinuz-3.16.0-57-generic
) points to /boot/vmlinuz-3.16.0-57-generic
 (/boot/vmlinuz-3.16.0-57-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.16.0-57-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-57-generic /boot/vmlinuz-3.16.0-57-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.16.0-57-generic /boot/vmlinuz-3.16.0-57-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-57-generic /boot/vmlinuz-3.16.0-57-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-57-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-57-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.16.0-57-generic.postinst line 1025.
dpkg: error processing package linux-image-3.16.0-57-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.16.0-57-generic:
 linux-image-extra-3.16.0-57-generic depends on linux-image-3.16.0-57-generic; however:
  Package linux-image-3.16.0-57-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.16.0-57-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic-lts-utopic:
 linux-image-generic-lts-utopic depends on linux-image-3.16.0-57-generic; however:
  Package linux-image-3.16.0-57-generic is not configured yet.
 linux-image-generic-lts-utopic depends on linux-image-extra-3.16.0-57-generic; however:
  Package linux-image-extra-3.16.0-57-generic is not configured yet.

dpkg: error processing package linux-image-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-utopic:
 linux-generic-lts-utopic depends on linux-image-generic-lts-utopic (= 3.16.0.57.48); however:
  Package linux-image-generic-lts-utopic is not configured yet.

dpkg: error processing package linux-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-56-generic /boot/vmlinuz-3.16.0-56-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.16.0-56-generic /boot/vmlinuz-3.16.0-56-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-56-generic /boot/vmlinuz-3.16.0-56-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-56-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-56-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.16.0-56-generic (--configure):
 subprocess installed post-installation script returned error exit status 1

Postfix configuration was untouched.  If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
 * Stopping Postfix Mail Transport Agent postfix
   ...done.
 * Starting Postfix Mail Transport Agent postfix
   ...done.
Errors were encountered while processing:
 linux-image-3.16.0-57-generic
 linux-image-extra-3.16.0-57-generic
 linux-image-generic-lts-utopic
 linux-generic-lts-utopic
 linux-image-extra-3.16.0-56-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/Users/rob/playbook.retry

drupalvm                   : ok=13   changed=1    unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
geerlingguy commented 8 years ago

It looks like:

gzip: stdout: No space left on device

Can you log in (vagrant ssh) and run df -h and paste the output? It looks like you've hit 20+ GB on the VM disk image.

robdecker commented 8 years ago
vagrant@drupalvm:/tmp$ df -h
Filesystem                                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root                         78G   12G   63G  16% /
none                                               4.0K     0  4.0K   0% /sys/fs/cgroup
udev                                               988M  4.0K  988M   1% /dev
tmpfs                                              201M  432K  200M   1% /run
none                                               5.0M     0  5.0M   0% /run/lock
none                                              1001M     0 1001M   0% /run/shm
none                                               100M     0  100M   0% /run/user
/dev/sda1                                          236M  229M     0 100% /boot
/dev/loop1                                          56M   56M     0 100% /tmp/vbox
192.168.88.1:/Users/rob/work/_drupalvm/_db-dumps_  931G  632G  300G  68% /db-dumps
vagrant                                            931G  632G  300G  68% /vagrant
geerlingguy commented 8 years ago

Yeah, it looks like the /boot volume is full (/dev/sda1), and that's causing the error.

See http://askubuntu.com/questions/89710/how-do-i-free-up-more-space-in-boot for more info—also, I typically blow out my Drupal VM instances on a weekly basis (vagrant destroy -f) and rebuild them from scratch, so this kind of problem is avoided :)

Drupal VM is structured so it can be destroyed and rebuilt as easily as possible, so it might be good when you run into issues like this to just destroy it and rebuild; otherwise you'll have to do some of the cleanup as suggested in the above thread on Ask Ubuntu.