vmbuilder policy-rc.d denied access

Bug #1008596 reported by Ted Bodfish
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

vmbuilder reports error "invoke-rc.d: policy-rc.d denied execution" many times and either doesn't work properly or crashes. I've tried this on a 12.04 Precise server and desktop - both fail. I was able to do this on 10.04 Lucid. Desktop output and cfg file contents follow:

user@computer:~/tweb$ sudo vmbuilder kvm ubuntu -o --config=tweb.cfg
2012-06-04 11:46:17,204 INFO : Calling hook: preflight_check
2012-06-04 11:46:17,213 INFO : Calling hook: set_defaults
2012-06-04 11:46:17,214 INFO : Calling hook: bootstrap
2012-06-04 11:54:41,051 INFO : Calling hook: configure_os
Extracting templates from packages: 100%
2012-06-04 12:01:40,860 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-06-04 12:01:48,674 INFO : Updating certificates in /etc/ssl/certs... 152 added, 0 removed; done.
2012-06-04 12:01:48,678 INFO : Running hooks in /etc/ca-certificates/update.d....done.
2012-06-04 12:01:54,746 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-06-04 12:01:58,692 INFO : update-binfmts: warning: /usr/share/binfmts/cli: no executable /usr/bin/cli found, but continuing anyway as you request
2012-06-04 12:01:58,698 INFO : update-binfmts: warning: found manually created entry for python2.7 in /proc/sys/fs/binfmt_misc; leaving it alone
2012-06-04 12:01:58,742 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-06-04 12:02:03,393 INFO :
2012-06-04 12:02:03,394 INFO : Creating config file /etc/idmapd.conf with new version
2012-06-04 12:02:04,057 INFO :
2012-06-04 12:02:04,058 INFO : Creating config file /etc/default/nfs-common with new version
2012-06-04 12:02:05,343 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-06-04 12:02:05,380 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-06-04 12:02:05,422 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-06-04 12:02:07,010 INFO : Creating SSH2 RSA key; this may take some time ...
2012-06-04 12:02:07,226 INFO : Creating SSH2 DSA key; this may take some time ...
2012-06-04 12:02:07,240 INFO : Creating SSH2 ECDSA key; this may take some time ...
2012-06-04 12:02:08,819 INFO : invoke-rc.d: policy-rc.d denied execution of stop.
2012-06-04 12:02:08,822 INFO :
2012-06-04 12:02:08,822 INFO : Warning: Fake initctl called, doing nothing
2012-06-04 12:02:08,824 INFO :
2012-06-04 12:02:08,824 INFO : Warning: Fake initctl called, doing nothing
2012-06-04 12:02:15,158 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-06-04 12:02:59,073 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-06-04 12:03:35,968 INFO : Using mono-apache-server2...
2012-06-04 12:03:36,187 INFO : Enabling module mod_mono.
2012-06-04 12:03:36,187 INFO : To activate the new configuration, you need to run:
2012-06-04 12:03:36,188 INFO : service apache2 restart
2012-06-04 12:03:45,052 INFO :
2012-06-04 12:03:45,053 INFO : Current default time zone: 'Etc/UTC'
2012-06-04 12:03:45,060 INFO : Local time is now: Mon Jun 4 16:03:45 UTC 2012.
2012-06-04 12:03:45,061 INFO : Universal Time is now: Mon Jun 4 16:03:45 UTC 2012.
2012-06-04 12:03:45,061 INFO :
2012-06-04 12:04:10,732 INFO : invoke-rc.d: policy-rc.d denied execution of stop.
2012-06-04 12:04:17,295 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-06-04 12:04:22,015 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-06-04 12:04:32,714 INFO : umount: /tmp/tmp5xQnXw/proc: device is busy.
2012-06-04 12:04:32,715 INFO : (In some cases useful info about processes that use
2012-06-04 12:04:32,716 INFO : the device is found by lsof(8) or fuser(1))
2012-06-04 12:04:32,717 INFO : Cleaning up
2012-06-04 12:04:33,763 ERROR : Process (['umount', '/tmp/tmp5xQnXw/proc']) returned 1. stdout: , stderr: umount: /tmp/tmp5xQnXw/proc: device is busy.
        (In some cases useful info about processes that use
         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 216, in main
    distro.build_chroot()
  File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 84, in build_chroot
    self.call_hooks('configure_os')
  File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 67, in call_hooks
    call_hooks(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 165, in call_hooks
    getattr(context, func, log_no_such_method)(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/distro.py", line 154, in configure_os
    self.suite.unmount_proc()
  File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py", line 110, in unmount_proc
    run_cmd('umount', '%s/proc' % self.context.chroot_dir)
  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', '/tmp/tmp5xQnXw/proc']) returned 1. stdout: , stderr: umount: /tmp/tmp5xQnXw/proc: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

tweb.cfg contents:

[DEFAULT]
arch = amd64
hostname = tweb
domain = sample.office
ip = 192.168.1.34
dns = 192.168.1.19
part = tweb.partition
user = username
name = User Name
pass = password
tmpfs = -

[ubuntu]
install_mirror = http://ca.archive.ubuntu.com/ubuntu
install_security_mirror = http://ca.archive.ubuntu.com/ubuntu
mirror = http://ca.archive.ubuntu.com/ubuntu
security_mirror = http://ca.archive.ubuntu.com/ubuntu
suite = precise
flavour = virtual
addpkg = openssh-server, apache2, libapache2-mod-mono, mono-apache-server2, vsftpd, acpid, portmap, nfs-common, iptables, nano, traceroute

[kvm]
bridge = clbrint

Revision history for this message
Ted Bodfish (tedbs) wrote :

I can confirm that this runs successfully on 10.04 Lucid - the only change to the cfg file is the name of the suite.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug.

I tried to reproduce it on precise, with your exact .cfg, but the build went fine for me. I did also get the informational messages about invoke-rc.d, but those appear to be harmless. I believe the bug you're having is basically the same as bug 879710.

Perhaps the answer there is to always delay umounts until fuser shows the fs unused.

Revision history for this message
Xavier L. (xav0989) wrote :

policy-rc.d is not a bug

Changed in vm-builder (Ubuntu):
status: New → Invalid
Revision history for this message
Ted Bodfish (tedbs) wrote :

I have successfully built vms by adding the line
removepkg = cron
to the [ubuntu] section of the .cfg file and then installing cron after the vm is up and running.
This was suggested in <a href="https://bugs.launchpad.net/vmbuilder/+bug/966439">bug 966439</a>.

Revision history for this message
martin suchanek (martin-suc) wrote :

I am aware of workaround but it does not work for me.
that problem still persist.

Changed in vm-builder (Ubuntu):
status: Invalid → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vm-builder (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.