nix-community / nixops-vbox

NixOps VirtualBox backend [maintainer=@AmineChikhaoui]
GNU Lesser General Public License v3.0
22 stars 15 forks source link

VirtualBox: nixops under Arch tries to stop -.slice, which fails #5

Open Denommus opened 6 years ago

Denommus commented 6 years ago

The following just happens in the first deployment, when the machine is being created.

Everything seems to run smoothly, until the step where units are restarted, when this happens:

bawebsite> closures copied successfully
webserver> perl: warning: Setting locale failed.
webserver> perl: warning: Please check that your locale settings:
webserver>      LANGUAGE = (unset),
webserver>      LC_ALL = (unset),
webserver>      LANG = "en_US.UTF-8"
webserver>     are supported and installed on your system.
webserver> perl: warning: Falling back to the standard locale ("C").
webserver> updating GRUB 2 menu...
webserver> installing the GRUB 2 boot loader on /dev/sda...
webserver> Installing for i386-pc platform.
webserver> Installation finished. No error reported.
webserver> stopping the following units: -.slice, alsa-store.service, audit.service, ip-up.target, kmod-static-nodes.service, network-local-commands.service, network-setup.service, nix-daemon.service, nix-daemon.socket, nscd.service, ntpd.service, system
.slice, systemd-modules-load.service, systemd-sysctl.service, systemd-tmpfiles-clean.timer, systemd-tmpfiles-setup-dev.service, systemd-udev-trigger.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd.service, systemd-vconso
le-setup.service, virtualbox.service                                                                                                                                                                                                                         
webserver> Failed to stop -.slice: Operation refused, unit -.slice may be requested by dependency only.
webserver> See system logs and 'systemctl status -.slice' for details.
packet_write_wait: Connection to 192.168.56.107 port 22: Broken pipe
webserver> error: Traceback (most recent call last):
  File "/nix/store/c00x8z5c334xkv73qg1cvf159078h8wv-nixops-1.6/lib/python2.7/site-packages/nixops/deployment.py", line 731, in worker
    raise Exception("unable to activate new configuration")
Exception: unable to activate new configuration

error: activation of 1 of 1 machines failed (namely on ‘webserver’)

If I restart the machine, though, the configuration seems to be correctly applied and the services runs correctly. This is the configuration I'm using: https://gist.github.com/Denommus/3e88cce1ebeb7dcb8a0cc65401c8c8ca

ip1981 commented 5 years ago

I'm suffering the same. Work around - kill VirtualBox instance, start it again, redeploy.