Commit Graph

334 Commits

Author SHA1 Message Date
Guillaume Maudoux
9f358f809d Configure a default trust store for openssl 2016-02-03 12:42:01 +01:00
Eelco Dolstra
2352e2589e audit: Disable in containers
This barfs:

Jan 18 12:46:32 machine 522i0x9l80z7gw56iahxjjsdjp0xi10q-audit-start[506]: The audit system is disabled
2016-01-26 16:25:40 +01:00
Domen Kožar
b39c51a362 Merge pull request #12323 from kragniz/rkt-v0.15.0
rkt: 0.14.0 -> 0.15.0
2016-01-21 22:27:33 +01:00
aszlig
c92d7481a5
multipath_tools: Rename to multipath-tools
See http://nixos.org/nixpkgs/manual/#sec-package-naming

I've added an alias for multipath_tools to make sure that we don't break
existing configurations referencing the old name.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-01-21 16:18:38 +01:00
Peter Jones
5b8c871842 If container name is already unique, don't append "-0"
When using `--ensure-unique-name`, don't needlessly append `"-0"` if the
container name is already unique.

This is especially helpful with NixOps since when it deploys to a
container it uses `--ensure-unique-name`.  This means that the container
name will never match the deployment host due to the `"-0"`.  Having the
container name and the host name match isn't exactly a requirement, but
it's nice to have and a small change.
2016-01-20 03:46:19 +01:00
Thomas Strobel
a04a7272aa Add missing 'type', 'defaultText' and 'literalExample' in module definitions
- add missing types in module definitions
- add missing 'defaultText' in module definitions
- wrap example with 'literalExample' where necessary in module definitions
2016-01-17 19:41:23 +01:00
Louis Taylor
6309f48137 rkt: 0.14.0 -> 0.15.0 2016-01-15 18:09:58 +00:00
Tristan Helmich
bce59a1a8b libvirtd service: Move mutable configs to /var
Modifies libvirt package to search for configs in /var/lib and changes
libvirtd service to copy the default configs to the new location.

This enables the user to change e.g. the networking configuration with
virsh or virt-manager and keep those settings.
2016-01-15 14:26:20 +01:00
Domen Kožar
7b0613d51e Revert "nixos/qemu-vm: Disable cache for $NIX_DISK_IMAGE"
This reverts commit 6353f580f9.

Unfortunately cache=none doesn't work with all filesystem options.

Hydra tests error out with: file system may not support O_DIRECT

See http://hydra.nixos.org/build/30323625/
2016-01-11 11:29:16 +01:00
Evgeny Egorochkin
ada9b3b666 azure-image: azure resource manager doesn't base64-encode custom data, unlike azure service manager 2016-01-10 11:35:44 +02:00
Arseniy Seroka
c03fe79265 Merge pull request #10996 from oxij/nixos-label
nixos: introduce system.nixosLabel support
2016-01-09 20:52:08 +03:00
Jan Malakhovski
119c8f91e7 nixos: introduce system.nixosLabel option and use it where appropriate
Setting nixosVersion to something custom is useful for meaningful GRUB
menus and /nix/store paths, but actuallly changing it rebulids the
whole system path (because of `nixos-version` script and manual
pages). Also, changing it is not a particularly good idea because you
can then be differentitated from other NixOS users by a lot of
programs that read /etc/os-release.

This patch introduces an alternative option that does all you want
from nixosVersion, but rebuilds only the very top system level and
/etc while using your label in the names of system /nix/store paths,
GRUB and other boot loaders' menus, getty greetings and so on.
2016-01-08 22:26:15 +00:00
Robin Gloster
88292fdf09 jobs -> systemd.services 2016-01-07 06:39:06 +00:00
Tobias Geerinckx-Rice
82419575aa btrfsProgs -> canonical btrfs-progs 2016-01-03 20:38:44 +01:00
Dan Peebles
cd7612b841 amazon-image: enable configure-from-userdata and the corresponding VM test 2015-12-30 04:59:52 +00:00
Eelco Dolstra
74aac17878 Force rebuild of some corrupted files 2015-12-29 16:39:26 +01: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
Evgeny Egorochkin
dac2c65109 azure agent service: provide SSL certificates path 2015-12-19 22:10:35 +02:00
aszlig
6353f580f9
nixos/qemu-vm: Disable cache for $NIX_DISK_IMAGE
As @domenkozar noted in #10828, cache=writeback seems to do more harm
than good:

https://github.com/NixOS/nixpkgs/issues/10828#issuecomment-164426821

He has tested it using the openstack NixOS tests and found that
cache=none significantly improves startup performance.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-12-14 17:36:22 +01:00
aszlig
a5bc11f9eb
nixos/vm-tests: Remove msize mount option
This seems to be the root cause of the random page allocation failures
and @wizeman did a very good job on not only finding the root problem
but also giving a detailed explanation of it in #10828.

Here is an excerpt:

  The problem here is that the kernel is trying to allocate a contiguous
  section of 2^7=128 pages, which is 512 KB. This is way too much:
  kernel pages tend to get fragmented over time and kernel developers
  often go to great lengths to try allocating at most only 1 contiguous
  page at a time whenever they can.

  From the error message, it looks like the culprit is unionfs, but this
  is misleading: unionfs is the name of the userspace process that was
  running when the system ran out of memory, but it wasn't unionfs who
  was allocating the memory: it was the kernel; specifically it was the
  v9fs_dir_readdir_dotl() function, which is the code for handling the
  readdir() function in the 9p filesystem (the filesystem that is used
  to share a directory structure between a qemu host and its VM).

  If you look at the code, here's what it's doing at the moment it tries
  to allocate memory:

    buflen = fid->clnt->msize - P9_IOHDRSZ;

    rdir = v9fs_alloc_rdir_buf(file, buflen);

  If you look into v9fs_alloc_rdir_buf(), you will see that it will try
  to allocate a contiguous buffer of memory (using kzalloc(), which is a
  wrapper around kmalloc()) of size buflen + 8 bytes or so.

  So in reality, this code actually allocates a buffer of size
  proportional to fid->clnt->msize. What is this msize? If you follow
  the definition of the structures, you will see that it's the
  negotiated buffer transfer size between 9p client and 9p server. On
  the client side, it can be controlled with the msize mount option.

  What this all means is that, the reason for running out of memory is
  that the code (which we can't easily change) tries to allocate a
  contiguous buffer of size more or less equal to "negotiated 9p
  protocol buffer size", which seems to be way too big (in our NixOS
  tests, at least).

After that initial finding, @lethalman tested the gnome3 gdm test
without setting the msize parameter at all and it seems to have resolved
the problem.

The reason why I'm committing this without testing against all of the
NixOS VM test is basically that I think we can only go better but not
worse than the current state.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-12-14 17:26:24 +01:00
Domen Kožar
3fca941aeb virtualisation.qemu.options: specify type 2015-12-13 19:06:22 +01:00
Arseniy Seroka
79d0fc45a9 Merge pull request #11565 from jgillich/rkt
rkt: add service
2015-12-11 08:04:44 +03:00
Jakob Gillich
c85ada394f rkt: add service 2015-12-11 05:53:20 +01:00
Evgeny Egorochkin
c16f90f515 Azure image: update ssh key type, start before the Azure agent 2015-12-09 07:42:37 +02:00
Evgeny Egorochkin
6db67186f2 Azure image: package and add azure agent 2015-12-09 07:42:37 +02:00
Domen Kožar
7402dd4197 nova-image: don't use ec2-data since it delays the bootup time 2015-12-03 11:10:32 +01:00
lethalman
b97f5e8b33 Merge pull request #7993 from wavewave/extra-binds
nixos-container: support user-defined extra binds
2015-11-29 15:42:58 +01:00
Luca Bruno
a6c42b5945 nixos/docker: enable socketActivation by default 2015-11-20 23:01:59 +01:00
Tomasz Kontusz
d3f6434579 virtualbox service: hide vboxnet0 from NetworkManager, fixes #10862 2015-11-10 12:21:35 +01:00
Domen Kožar
f1508b3a23 nova-image: use make-disk-image.nix 2015-10-26 16:16:45 +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
Eelco Dolstra
cab1483a95 Blacklist the xen_fbfront kernel module
This gets rid of a 30 second delay during boot. See e.g
https://github.com/coreos/bugs/issues/208.
2015-09-28 22:15:47 +02:00
Eelco Dolstra
e866840a12 Wait for udev after resizing partitions
Otherwise the EC2 boot may panic.
2015-09-28 22:15:47 +02:00
Eelco Dolstra
b3347287be Use make-disk-image.nix for VirtualBox images 2015-09-28 14:31:19 +02:00
Eelco Dolstra
640dff2918 Fix GRUB syntax in EC2 HVM images
There is no "root" command in GRUB 2, and it's not needed anyway. This
command delayed HVM boots for a few seconds.
2015-09-28 13:47:14 +02:00
Eelco Dolstra
7338f5ff46 ec2-data.nix: Remove superfluous check 2015-09-28 13:47:14 +02:00
Ian-Woo Kim
b3eebcd93c Merge branch 'master' into extra-binds 2015-09-28 06:02:52 +00:00
Ian-Woo Kim
c6b031d32b minor changes 2015-09-28 05:48:16 +00:00
Eelco Dolstra
aeb31b97ad Update AMI generator
The EBS and S3 (instance-store) AMIs are now created from the same
image. HVM instance-store AMIs are also generated.

Disk image generation has been factored out into a function
(nixos/lib/make-disk-image.nix) that can be used to build other kinds
of images.
2015-09-27 21:06:40 +02:00
Thomas Strobel
1f5f472a8a Revert "openvswitch module: do not fork services"
This reverts commit fcab752abf.
2015-09-24 14:58:31 +02:00
Thomas Strobel
251a00da4c openvswitch module: add option to reset db on start 2015-09-24 12:45:46 +02:00
Eelco Dolstra
e73b19ae4e ec2-data.nix: Print all SSH host keys
Also, don't barf if there is no DSA key.
2015-09-24 11:49:18 +02:00
Thomas Strobel
fcab752abf openvswitch module: do not fork services 2015-09-24 10:27:33 +02:00
Eelco Dolstra
df665ded7e ec2-data.nix: Support ed25519 host keys 2015-09-23 00:03:33 +02:00
Jaka Hudoklin
74209a4ca8
virtualbox service: add support for vboxsf guest filesystem
Closes #9358

Signed-off-by: Jaka Hudoklin <jakahudoklin@gmail.com>
Fix reference to bin/mount.vboxsf.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-21 22:32:13 +02:00
Jaka Hudoklin
e0881324ac Merge pull request #9925 from oxij/nixos-cleanups-and-fixes
nixos types: cleanups and fixes
2015-09-19 00:28:49 +02:00
Jan Malakhovski
a153de28bb nixos: rename some outputs for better discoverability in /nix/store 2015-09-18 19:00:20 +00:00
Jan Malakhovski
6eadb16022 nixos: fix some types 2015-09-18 18:48:50 +00:00