[Bug 1008225] Re: vmbuilder fails using tmpfs due to upstart restarting cron in the tmpfs
Serge Hallyn
1008225 at bugs.launchpad.net
Mon Aug 6 21:27:46 UTC 2012
** Description changed:
+ ===============================
+ SRU Justification:
+ 1. Impact: simple vm creations fail
+ 2. Development fix: use dpkg-divert to replace initctl with our stub, so that when usptart is installed it does not replace it with the real one
+ 3. Stable fix: same as development fix
+ 4. Test case:
+ sudo vmbuilder kvm ubuntu -o -v --tmpfs 1536 --rootsize=4096M --swapsize=512M -d vm1
+ 5. Regression potential: The behavior is changed for all target releases, so a regression is not impossible. However I don't see anything which looks gragile, and without this fix it is definitely broken.
+
+ ===============================
root at tina ~ # vmbuilder kvm ubuntu -d /srv/kvm/b --tmpfs - -m 4096 --ip 192.168.0.18 --hostname b --user tokudan --pass abc123 --addpkg openssh-server --addpkg unattended-upgrades --addpkg acpid
2012-06-03 22:37:12,118 INFO : Mounting tmpfs under /tmp/tmptcTxLBtmpfs
2012-06-03 22:37:12,446 INFO : Calling hook: preflight_check
2012-06-03 22:37:12,449 INFO : Calling hook: set_defaults
2012-06-03 22:37:12,449 INFO : Calling hook: bootstrap
2012-06-03 22:38:13,765 INFO : Calling hook: configure_os
2012-06-03 22:38:18,088 INFO : update-alternatives: error: no alternatives for rsh.
2012-06-03 22:38:18,127 INFO : update-alternatives: error: no alternatives for rlogin.
2012-06-03 22:38:18,166 INFO : update-alternatives: error: no alternatives for rcp.
2012-06-03 22:38:18,420 INFO : Creating SSH2 RSA key; this may take some time ...
2012-06-03 22:38:18,474 INFO : Creating SSH2 DSA key; this may take some time ...
2012-06-03 22:38:18,517 INFO :
2012-06-03 22:38:18,517 INFO : Warning: Fake initctl called, doing nothing
2012-06-03 22:38:18,517 INFO :
2012-06-03 22:38:18,517 INFO : Warning: Fake initctl called, doing nothing
2012-06-03 22:38:18,624 INFO : update-rc.d: warning: unattended-upgrades start runlevel arguments (none) do not match LSB Default-Start values (0 6)
2012-06-03 22:38:18,624 INFO : update-rc.d: warning: unattended-upgrades stop runlevel arguments (0 6) do not match LSB Default-Stop values (none)
2012-06-03 22:38:19,287 INFO :
2012-06-03 22:38:19,287 INFO : Current default time zone: 'Etc/UTC'
2012-06-03 22:38:19,290 INFO : Local time is now: Sun Jun 3 20:38:19 UTC 2012.
2012-06-03 22:38:19,290 INFO : Universal Time is now: Sun Jun 3 20:38:19 UTC 2012.
2012-06-03 22:38:19,290 INFO :
Extracting templates from packages: 100%
2012-06-03 22:38:24,563 INFO :
2012-06-03 22:38:24,563 INFO : Current default time zone: 'Etc/UTC'
2012-06-03 22:38:24,565 INFO : Local time is now: Sun Jun 3 20:38:24 UTC 2012.
2012-06-03 22:38:24,565 INFO : Universal Time is now: Sun Jun 3 20:38:24 UTC 2012.
2012-06-03 22:38:24,565 INFO : Run 'dpkg-reconfigure tzdata' if you wish to change it.
2012-06-03 22:38:24,565 INFO :
2012-06-03 22:38:26,026 INFO : stop: Unknown instance:
2012-06-03 22:38:27,353 INFO : Updating certificates in /etc/ssl/certs... WARNING: Skipping duplicate certificate brasil.gov.br.pem
2012-06-03 22:38:27,353 INFO : 0 added, 1 removed; done.
2012-06-03 22:38:27,354 INFO : Running hooks in /etc/ca-certificates/update.d....done.
2012-06-03 22:38:27,768 INFO : restart: Unknown instance:
2012-06-03 22:38:27,861 INFO : start: Unknown parameter: JOB
2012-06-03 22:38:28,082 INFO : umount: /tmp/tmptcTxLBtmpfs/dev: device is busy.
2012-06-03 22:38:28,082 INFO : (In some cases useful info about processes that use
2012-06-03 22:38:28,083 INFO : the device is found by lsof(8) or fuser(1))
2012-06-03 22:38:28,083 INFO : Cleaning up
2012-06-03 22:38:28,083 ERROR : Process (['umount', '/tmp/tmptcTxLBtmpfs/dev']) returned 1. stdout: , stderr: umount: /tmp/tmptcTxLBtmpfs/dev: device is busy.
- (In some cases useful info about processes that use
- the device is found by lsof(8) or fuser(1))
+ (In some cases useful info about processes that use
+ the device is found by lsof(8) or fuser(1))
2012-06-03 22:38:28,083 INFO : Unmounting tmpfs from /tmp/tmptcTxLBtmpfs
2012-06-03 22:38:28,086 INFO : umount: /tmp/tmptcTxLBtmpfs: device is busy.
2012-06-03 22:38:28,087 INFO : (In some cases useful info about processes that use
2012-06-03 22:38:28,087 INFO : the device is found by lsof(8) or fuser(1))
Traceback (most recent call last):
- File "/usr/bin/vmbuilder", line 24, in <module>
- cli.main()
- File "/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py", line 239, in main
- util.clean_up_tmpfs(tmpfs_mount_point)
- File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 199, in clean_up_tmpfs
- run_cmd(*umount_cmd)
- File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 120, in run_cmd
- raise VMBuilderException, "Process (%s) returned %d. stdout: %s, stderr: %s" % (args.__repr__(), status, mystdout.buf, mystderr.buf)
+ File "/usr/bin/vmbuilder", line 24, in <module>
+ cli.main()
+ File "/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py", line 239, in main
+ util.clean_up_tmpfs(tmpfs_mount_point)
+ File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 199, in clean_up_tmpfs
+ run_cmd(*umount_cmd)
+ File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 120, in run_cmd
+ raise VMBuilderException, "Process (%s) returned %d. stdout: %s, stderr: %s" % (args.__repr__(), status, mystdout.buf, mystderr.buf)
VMBuilder.exception.VMBuilderException: Process (['umount', '-t', 'tmpfs', '/tmp/tmptcTxLBtmpfs']) returned 1. stdout: , stderr: umount: /tmp/tmptcTxLBtmpfs: device is busy.
- (In some cases useful info about processes that use
- the device is found by lsof(8) or fuser(1))
+ (In some cases useful info about processes that use
+ the device is found by lsof(8) or fuser(1))
root at tina ~ # lsof | grep /tmp/tmptcTxLBtmpfs | awk '{print $1, $2}' | sort -u
cron 32720
root at tina ~ # ls -l /proc/32720/exe
lrwxrwxrwx 1 root root 0 Jun 3 22:40 /proc/32720/exe -> /tmp/tmptcTxLBtmpfs/usr/sbin/cron
root at tina ~ # kill -9 32720
root at tina ~ # tail /var/log/syslog
Jun 3 22:23:44 tina cron[12186]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Jun 3 22:23:44 tina kernel: [19691.313399] init: cron main process ended, respawning
Jun 3 22:38:27 tina cron[32719]: (CRON) INFO (pidfile fd = 3)
Jun 3 22:38:27 tina cron[32720]: (CRON) STARTUP (fork ok)
Jun 3 22:38:27 tina cron[32720]: (CRON) INFO (Running @reboot jobs)
Jun 3 22:40:35 tina kernel: [20701.709483] init: cron main process (32720) killed by KILL signal
Jun 3 22:40:35 tina kernel: [20701.709515] init: cron main process ended, respawning
Jun 3 22:40:35 tina cron[471]: (CRON) INFO (pidfile fd = 3)
Jun 3 22:40:35 tina cron[472]: (CRON) STARTUP (fork ok)
Jun 3 22:40:35 tina cron[472]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
root at tina ~ # lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04
** Changed in: vm-builder (Ubuntu Precise)
Status: Triaged => In Progress
** Changed in: vm-builder (Ubuntu Precise)
Assignee: Serge Hallyn (serge-hallyn) => (unassigned)
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to vm-builder in Ubuntu.
https://bugs.launchpad.net/bugs/1008225
Title:
vmbuilder fails using tmpfs due to upstart restarting cron in the
tmpfs
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/vm-builder/+bug/1008225/+subscriptions
More information about the Ubuntu-server-bugs
mailing list