Commit graph

17 commits

Author SHA1 Message Date
Nikolay Amiantov b2ebecd9e5 modprobe service: drop kmod wrapper 2016-08-16 00:19:25 +03:00
Benno Fünfstück 3850123f32 nixos/docker: use wrapped modprobe
We need to use wrapped modprobe, so that it finds the right
modules. Docker needs modprobe to load overlay kernel module
for example.

This fixes an an error starting docker if the booted system's kernel
version is different from the /run/current-system profile's one.
2016-06-11 21:13:37 +02:00
Benno Fünfstück 79b4e5a8d7 docker module: fix kernel module loading
The docker module used different code for socket-activated docker daemon than for the non-socket activated daemon.
In particular, if the socket-activated daemon is used, then modprobe wasn't set up to be usable and in PATH for
the docker daemon, which resulted in a failure to start the daemon with overlayfs as storageDriver if the
`overlay` kernel module wasn't already loaded. This commit fixes that bug (which only appears if socket
activation is used), and also reduces the duplication between code paths so that it's easier to keep
both in sync in future.
2015-12-24 12:07:45 +01:00
Luca Bruno a6c42b5945 nixos/docker: enable socketActivation by default 2015-11-20 23:01:59 +01:00
Bjørn Forsman 5f17aeb403 nixos/docker: default storageDriver to "devicemapper"
Commit 9bfe92ecee ("docker: Minor improvements, fix failing test") added
the services.docker.storageDriver option, made it mandatory but didn't
give it a default value. This results in an ugly traceback when users
enable docker, if they don't pay enough attention to also set the
storageDriver option. (An attempt was made to add an assertion, but it
didn't work, possibly because of how "mkMerge" works.)

The arguments against a default value were that the optimal value
depends on the filesystem on the host. This is, AFAICT, only in part
true. (It seems some backends are filesystem agnostic.) Also, docker
itself uses a default storage driver, "devicemapper", when no
--storage-driver=x options are given. Hence, we use the same value as
default.

Add a FIXME comment that 'devicemapper' breaks NixOS VM tests (for yet
unknown reasons), so we still run those with the 'overlay' driver.

Closes #10100 and #10217.
2015-10-04 14:34:38 +02:00
Bjørn Forsman 424e6e501a nixos/modules: simplify pkgs.zfs handling
Thanks, @lethalman.
2015-10-04 14:31:16 +02:00
Casey Ransom 791b600aac nixos/docker: Include ZFS commands in PATH for ZFS storagedriver
When using the ZFS storagedriver in docker, it shells out for the ZFS
commands. The path configuration for the systemd task does not include
ZFS, so if the driver is set to ZFS, add ZFS utilities to the PATH.

This will resolve https://github.com/NixOS/nixpkgs/issues/10127

[Bjørn: prefix commit message with "nixos/docker:", remove extra space
before ';']
2015-10-04 14:13:56 +02:00
Jan Malakhovski 6eadb16022 nixos: fix some types 2015-09-18 18:48:50 +00:00
Ragnar Dahlén 9bfe92ecee docker: Minor improvements, fix failing test
- Replace usage of deprecated CLI flag `--daemon`
- Introduce `storageDriver` option for module
- Fix failing test by using `overlay` storage driver
2015-09-04 00:23:38 +01:00
Mateusz Kowalczyk 23187c3431 docker: allow the user to override postStart
My use-case: passing -H SOM.EIP.ADD.RES:PORT doesn't result in a .sock
file so the service would never go up.
2015-07-20 14:28:49 +01:00
Luca Bruno 6c8e6aaa24 nixos docker: fix service and test 2015-07-05 13:57:23 +02:00
Jaka Hudoklin d6660af8ac nixos/docker: set extraOptions to separatedString type
This change is needed if you want to pass extraOptions to docker in multiple
nixos modules.
2015-04-25 15:25:15 +02:00
Jaka Hudoklin 40d73c5eb7 nixos/docker: fix module, add simple test 2014-12-01 17:20:35 +01:00
Jaka Hudoklin 2b261c1edf nixos: add kubernetes module 2014-11-29 02:27:17 +01:00
Boris Sukholitko 0d89afdedd docker: propagate nix.proxy into daemon environment 2014-11-07 13:46:36 +02:00
Jaka Hudoklin 43d9f92c82 nixos: docker, create docker group 2014-09-03 21:23:30 +02:00
Paul Colomiets 9bc1676e5a Upgrade docker to 1.1.2 and add docker module
This version of module has disabled socketActivation, because until
nixos upgrade systemd to at least 214, systemd does not support
SocketGroup. So socket is created with "root" group when
socketActivation enabled. Should be fixed as soon as systemd upgraded.

Includes changes from #3015 and supersedes #3028
2014-07-28 21:45:49 +02:00