Commit graph

1628 commits

Author SHA1 Message Date
aszlig
d7c7fc4603 nixos/tests/systemd: Fix x-initrd-mount flakiness (#67798)
It turns out that checking for the last mount time of an ext4 file
system isn't a very reliable way to check whether the file system was
properly unmounted.

When creating that test in the first place (88530e02b6),
I was reluctant to inspect the file system when the VM is down and was
searching for a way to check for a clean unmount *after* the file system
was mounted again to make sure we don't need to create a 512 MB raw
image on the host.

Fortunately however, when converting from qcow2, qemu-img actually
writes a sparse file, so for most file systems (that is, file systems
supporting sparse files) this shouldn't waste a lot of disk space.

So when investigating the flakiness, I found that whenever the test is
failing, the unmount of /test-x-initrd-mount was done *before* the final
step during which systemd remounts+unmounts all the remaining file
systems.

I haven't investigated why this is the case, but the test is a
regression test for https://github.com/NixOS/nixpkgs/issues/35268, which
actually didn't unmount the file system *at* *all*, so really all we
need to take care here is whether the unmount has happened and not
*how*.

To make sure that checking the filesystem state is enough for this, I
temporarily replaced the $machine->shutdown call with $machine->crash
and verified that the file system state is "not clean".

Signed-off-by: aszlig <aszlig@nix.build>
Fixes: https://github.com/NixOS/nixpkgs/issues/67555
2019-08-31 00:30:50 -04:00
Arian van Putten
604b7c139f Fix letsencrypt (#60219)
* nixos/acme: Fix ordering of cert requests

When subsequent certificates would be added, they would
not wake up nginx correctly due to target units only being triggered
once. We now added more fine-grained systemd dependencies to make sure
nginx always is aware of new certificates and doesn't restart too early
resulting in a crash.

Furthermore, the acme module has been refactored. Mostly to get
rid of the deprecated PermissionStartOnly systemd options which were
deprecated. Below is a summary of changes made.

* Use SERVICE_RESULT to determine status
This was added in systemd v232. we don't have to keep track
of the EXITCODE ourselves anymore.

* Add regression test for requesting mutliple domains

* Deprecate 'directory' option
We now use systemd's StateDirectory option to manage
create and permissions of the acme state directory.

* The webroot is created using a systemd.tmpfiles.rules rule
instead of the preStart script.

* Depend on certs directly

By getting rid of the target units, we make sure ordering
is correct in the case that you add new certs after already
having deployed some.

Reason it broke before:  acme-certificates.target would
be in active state, and if you then add a new cert, it
would still be active and hence nginx would restart
without even requesting a new cert. Not good!  We
make the dependencies more fine-grained now. this should fix that

* Remove activationDelay option

It complicated the code a lot, and is rather arbitrary. What if
your activation script takes more than activationDelay seconds?

Instead, one should use systemd dependencies to make sure some
action happens before setting the certificate live.

e.g. If you want to wait until your cert is published in DNS DANE /
TLSA, you could create a unit that blocks until it appears in DNS:

```
RequiredBy=acme-${cert}.service
After=acme-${cert}.service
ExecStart=publish-wait-for-dns-script
```
2019-08-29 16:32:59 +02:00
Silvan Mosberger
6233291d95
Merge pull request #64738 from rnhmjoj/magnetico
magnetico: init package and service
2019-08-28 18:39:21 +02:00
rnhmjoj
ea40c66bf5
nixos/magnetico: add test 2019-08-28 14:19:24 +02:00
volth
08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
Frederik Rietdijk
5061fe0c2c Merge staging-next into staging 2019-08-28 08:26:42 +02:00
worldofpeace
27a4afefbe
Merge pull request #66859 from worldofpeace/xfce4-14-module
nixos/xfce4-14: init
2019-08-27 22:37:03 -04:00
Frederik Rietdijk
98640fd482 Merge master into staging-next 2019-08-27 16:36:47 +02:00
Florian Klink
9a02d9c75e
Merge pull request #66984 from flokli/systemd-cgroup-accounting
nixos/systemd: enable systemd cgroup accounting by default
2019-08-27 11:38:28 +02:00
Aaron Andersen
87fdc06a97
Merge pull request #63634 from aanderse/moodle
moodle: init at 3.7.1
2019-08-26 21:12:44 -04:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Florian Klink
6b075ddc8f nixos/systemd: add cgroup accounting test 2019-08-25 22:26:12 +02:00
Marek Mahut
1a6d3f5bc2 nixos/jormungandr: adding genesis tests 2019-08-25 18:33:13 +02:00
Aaron Andersen
3bd03d2c0a nixos/moodle: init service 2019-08-25 08:12:28 -04:00
Vladimír Čunát
2e6bf42a22
Merge branch 'master' into staging-next
There ver very many conflicts, basically all due to
name -> pname+version.  Fortunately, almost everything was auto-resolved
by kdiff3, and for now I just fixed up a couple evaluation problems,
as verified by the tarball job.  There might be some fallback to these
conflicts, but I believe it should be minimal.

Hydra nixpkgs: ?compare=1538299
2019-08-24 08:55:37 +02:00
Jan Tojnar
a8d3aebdce
Merge pull request #67318 from jtojnar/gnome-photos
gnome-photos: 3.32.0 → 3.32.1
2019-08-23 19:49:43 +02:00
Jan Tojnar
c6eb691fb8
gnome-photos: add installed tests 2019-08-23 19:31:14 +02:00
Lassulus
8b12bfcb83
Merge pull request #66215 from ajs124/ejabberd/19.08
ejabberd: 19.05 -> 19.08
2019-08-23 13:27:55 +02:00
Marek Mahut
882e5b0e05
Merge pull request #67213 from mmahut/jormungandr
nixos: adding jormungandr service
2019-08-23 11:07:49 +02:00
Marek Mahut
4aef2212ee
Revert "nixos/containers: add unprivileged option" 2019-08-23 08:24:06 +02:00
Marek Mahut
27acea73b8
Merge pull request #67130 from uvNikita/containers/unprivileged
nixos/containers: add unprivileged option
2019-08-23 08:00:35 +02:00
Jan Tojnar
91b46353a5
Merge pull request #67308 from jtojnar/libxmlb-0.1.11
libxmlb: 0.1.10 → 0.1.11
2019-08-23 02:06:41 +02:00
Jan Tojnar
93f4d6f6ae
nixos/tests/libxmlb: init 2019-08-23 01:34:48 +02:00
Marek Mahut
f4ca6e3dd1
Merge pull request #66722 from mmahut/trezord-emulator
trezord: adding emulator support (plus test)
2019-08-22 23:25:18 +02:00
Marek Mahut
8d0776be66 nixos/tests: adding jormungandr service test 2019-08-22 07:10:16 +02:00
worldofpeace
fd7d31b50e nixosTests.xfce4-14: init
This is pretty much identical to the xfce test we currently have.
2019-08-21 22:04:29 -04:00
Danylo Hlynskyi
855be67358
nginx: expose generated config and allow nginx reloads (#57429)
* nginx: expose generated config and allow nginx reloads

Fixes: https://github.com/NixOS/nixpkgs/issues/15906
Another try was done, but not yet merged in https://github.com/NixOS/nixpkgs/pull/24476

This add 2 new features: ability to review generated Nginx config
(and NixOS has sophisticated generation!) and reloading
of nginx on config changes. This preserves nginx restart on package
updates.

I've modified nginx test to use this new feature and check reload/restart
behavior.

* rename to enableReload

* add sleep(1) in ETag test (race condition) and rewrite rebuild-switch using `nesting.clone`
2019-08-21 16:52:46 +03:00
Florian Klink
9f237fe444
Merge pull request #45392 from dguibert/dg/wireguard
nixos/wireguard: setup interface with systemd-networkd
2019-08-21 15:48:05 +02:00
Félix Baylac-Jacqué
0528816570 systemd-networkd: add tests
(cherry picked from commit ec073e41a0dc8273cd81cf61fa37004310120af2)
2019-08-21 11:11:28 +02:00
Aaron Andersen
249b4ad942
Merge pull request #66492 from aanderse/extra-subservice-cleanup
nixos/httpd: extraSubservices cleanup
2019-08-20 18:55:08 -04:00
Nikita Uvarov
7e7fc6471e
nixos/containers: add unprivileged option
Fixes #57083.
2019-08-21 00:01:29 +02:00
ajs124
9a0e820f5d nixos/ejabberd: fix test for new release 2019-08-20 11:09:40 +02:00
Matthieu Coudron
0f32b32c95
Merge pull request #63150 from Izorkin/prosody-test
nixos/tests/prosody: update prosody tests
2019-08-20 17:52:58 +09:00
Michael Raskin
0cbeac4f66
Merge pull request #66736 from markuskowa/upd-gluster
glusterfs: 4.0 -> 6.5
2019-08-20 08:08:57 +00:00
Izorkin
89c69bfb79 prosody: fix work after update luadbi packages 2019-08-20 10:24:49 +03:00
Izorkin
bb4816d41c nixos/tests/prosodyMysql: add check work prosody with MySQL database 2019-08-20 10:24:49 +03:00
Izorkin
e328ea9c11 nixos/tests/prosody: checking work prosody through local network 2019-08-20 10:24:48 +03:00
Izorkin
691da63cba nixos/tests: move ejabberd and prosody test to xmpp folder 2019-08-20 10:24:47 +03:00
Marek Mahut
3b6258946f
Merge pull request #64407 from dasJ/icingaweb-test
nixos/icingaweb: Fix module path; Add test
2019-08-19 21:27:16 +02:00
Marek Mahut
94c51859df
Merge pull request #66846 from uvNikita/containers/ephemeral
nixos/containers: add 'ephemeral' option
2019-08-19 20:55:33 +02:00
Florian Klink
93a03177f2
Merge pull request #66482 from flokli/systemd-sysctl
nixos/systemd: install sysctl snippets
2019-08-19 16:32:00 +02:00
Nikita Uvarov
c740f0d400
nixos/containers: add 'ephemeral' option 2019-08-19 15:21:35 +02:00
Aaron Andersen
8227b2f29e
Merge pull request #66399 from mmahut/metabase
metabase: service module and test
2019-08-18 19:49:05 -04:00
Markus Kowalewski
6104ad00a1
nixos/glusterfs: add test 2019-08-18 18:58:00 +02:00
Florian Klink
8e923dfe36 nixosTests.systemd: add fq_codel test 2019-08-18 17:54:26 +02:00
Florian Klink
368be910fc
Merge pull request #66825 from flokli/nixos-systemd-test-dup
nixosTests.systemd: remove duplicate copypasta
2019-08-18 17:54:09 +02:00
danbst
d80cd26ff9 Merge branch 'master' into flip-map-foreach 2019-08-18 18:00:25 +03:00
Marek Mahut
d2ebcec779 tests: adding metabase service test 2019-08-18 13:44:26 +02:00
Florian Klink
ffef31459a nixosTests.systemd: remove duplicate copypasta
It seems the regression test for #35268 sneaked in twice.
2019-08-18 13:11:51 +02:00
Frederik Rietdijk
fe9a3e3e63 Merge staging-next into staging 2019-08-17 09:39:23 +02:00
Frederik Rietdijk
c68f58d95c Merge master into staging-next 2019-08-17 09:30:16 +02:00
Marek Mahut
20ea4b6dd3 tests: adding trezord 2019-08-16 17:05:13 +02:00
Aaron Andersen
1dcf51f8eb nixos/tests/subversion: drop unreferenced/unmaintained test 2019-08-15 21:00:27 -04:00
Aaron Andersen
d1129a5688 nixos/tests/php-pcre: replace usage of deprecated services.httpd.extraSubservices 2019-08-15 21:00:27 -04:00
volth
46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00
Matthew Bauer
e9b7085ff8 cups: add myself as maintainer 2019-08-14 11:47:48 -04:00
Matthew Bauer
01cd4663d6 tests/printing: don’t wait for unit services
These are now socket activated, we don’t need it to start up front.
2019-08-14 11:47:48 -04:00
Frederik Rietdijk
8d56f2472e Merge master into staging-next 2019-08-14 13:45:54 +02:00
Peter Hoeg
16bd66818a
Merge pull request #63716 from peterhoeg/f/mosquitto
nixos/mosquitto: make the tests run
2019-08-13 22:45:38 +08:00
Lassulus
612871e2ec
Merge pull request #66375 from emmanuelrosa/syncthing-1.2.1
syncthing: 1.1.4 -> 1.2.1
2019-08-12 00:22:25 +02:00
Notkea
4ff9a48398 nixos/postgresql-wal-receiver: add module (#63799) 2019-08-11 20:09:42 +03:00
Emmanuel Rosa
d80670bdc2 syncthing: 1.1.4 -> 1.2.1
syncthing-gtk: add missing runtime dependencies

NixOS: fix syncthing-init NixOS test
2019-08-11 08:35:04 +07:00
worldofpeace
2eaef474f2
Merge pull request #66236 from worldofpeace/test-reorganize
Reorganize GNOME tests, re-enable LightDM for release-combined
2019-08-10 11:23:57 -04:00
Silvan Mosberger
ce82d0b61a
Couchdb: Don't chown /var/log to couchdb (#65347)
Couchdb: Don't chown /var/log to couchdb
2019-08-10 01:36:15 +02:00
Bas van Dijk
fae25242e9
Merge pull request #66327 from basvandijk/parameterizable-nixos-generate-config
nixos-generate-config: enable overriding configuration.nix
2019-08-09 14:39:34 +02:00
Frederik Rietdijk
9bd78cb048 Merge master into staging-next 2019-08-09 14:00:27 +02:00
Bas van Dijk
810388afd2 nixos-generate-config: enable overriding configuration.nix 2019-08-08 17:00:10 +02:00
worldofpeace
63a1787ed5 nixosTests.gnome{xorg}: re-enable on aarch64 2019-08-07 15:53:26 -04:00
Danylo Hlynskyi
0730e81785
postgresql: running initdb from command line now works (#65309)
The issue was only with NixOS service, `postgresql` installed through
`nix-env` was not affected.

Fixes https://github.com/NixOS/nixpkgs/issues/23655
2019-08-07 14:17:36 +03:00
worldofpeace
6f86c002dd nixosTests.lightdm: add me to maintainers 2019-08-06 20:51:44 -04:00
worldofpeace
9d0996ff11 nixosTests.gnome3{xorg}: add gnome3 maintainers 2019-08-06 20:51:44 -04:00
worldofpeace
feb4b30074 nixos/release-combined: re-enable lightdm test
This has been tested in the Pantheon test
for a year now and it does fine on hydra.
2019-08-06 20:51:44 -04:00
worldofpeace
5efe51ccc2 nixosTests.gnome3: rename from gnome3-gdm
The actual only difference from the gnome3-xorg
test is that this tests the wayland session.
It's also more accurate to call it just "gnome3"
since wayland is default here.
2019-08-06 20:51:44 -04:00
worldofpeace
087c640e1a nixosTests.gnome3-xorg: rename from gnome3 2019-08-06 19:13:35 -04:00
Andreas Rammhold
955480e6bf
Merge pull request #65950 from aanderse/mysql-update
mysql57: 5.7.25 -> 5.7.27
2019-08-06 08:15:50 +00:00
Danylo Hlynskyi
7585496eff
Merge branch 'master' into flip-map-foreach 2019-08-05 14:09:28 +03:00
danbst
0f8596ab3f mass replace "flip map -> forEach"
See `forEach`-introduction commit.
```
rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /forEach /g'
```
2019-08-05 14:03:38 +03:00
danbst
91bb646e98 Revert "mass replace "flip map -> foreach""
This reverts commit 3b0534310c.
2019-08-05 14:01:45 +03:00
Aaron Andersen
f1faec8249 nixos/mysql: test the mysql package, not just mariadb 2019-08-04 10:41:55 -04:00
Sarah Brofeldt
bf4cddf13b
Merge pull request #65616 from JohnAZoidberg/cassandra-jmxport-test
nixos/tests/cassandra: Test jmxPort
2019-08-03 08:40:17 +02:00
Frederik Rietdijk
7560e2d64f
Merge pull request #65376 from abbradar/mdadm-upstream
Use upstream units for mdadm
2019-08-03 08:06:07 +02:00
Frederik Rietdijk
d20a59d2e5 Merge master into staging-next 2019-08-02 23:27:18 +02:00
WilliButz
afd0dc17d6
nixos/prometheus-exporters: use DynamicUser by default
Only define seperate users and groups when necessary.
2019-08-02 18:50:01 +02:00
WilliButz
c221f9fdf2
Merge pull request #65751 from mayflower/pkgs/prometheus-postgres-exporter
prometheus-postgres-exporter: init at 0.5.1
2019-08-02 18:45:32 +02:00
Franz Pletz
e4c60a1e42
prometheus-postgres-exporter: init at 0.5.1 2019-08-02 15:59:29 +02:00
Frederik Rietdijk
6f723b9bad Merge master into staging-next 2019-08-02 09:18:37 +02:00
Robin Gloster
41dac4bf9f
Merge pull request #65582 from WilliButz/add-mailexporter
prometheus-mail-exporter: init at 2019-07-14, add module and test
2019-08-01 23:14:21 +00:00
Frederik Rietdijk
55e4555b77 Merge master into staging-next 2019-08-01 09:42:54 +02:00
Aaron Andersen
a1f738ba87
Merge pull request #62748 from aanderse/mediawiki
nixos/mediawiki: init service to replace httpd subservice
2019-07-31 22:12:23 -04:00
Nikolay Amiantov
5636fe572b systemd test: add test for systemd-shutdown scripts 2019-08-01 00:55:35 +03:00
worldofpeace
6a79f6fb71 nixosTests.flatpak-builder: enable portals
Forgot about this test. Shouldn't fail with an assertion
error anymore.
2019-07-30 23:52:25 -04:00
Daniel Schaefer
8fbf9559df nixos/tests/cassandra: Test jmxPort
The test sets it to a non-standard port so it won't work accidentally
now and we'll be sure that our NixOS option works.
2019-07-31 00:55:04 +02:00
WilliButz
deedad80c7
nixos/tests/prometheus-exporters: add mail exporter 2019-07-30 19:29:22 +02:00
Andrew Childs
a5328e1386 fluentd: add simple test 2019-07-30 00:37:21 +09:00
Bas van Dijk
6a59dc35f6 nixos/tests/prometheus-2.nix: increase diskSize of the store machine
This is to fix the following error in the test on aarch64-linux:

store# [  126.911144] thanos[739]: level=error ts=2019-06-16T14:00:26.59870538Z caller=main.go:182 msg="running command failed" err="error executing compaction: first pass of downsampling failed: create dir: mkdir /var/lib/thanos-compact/downsample: no space left on device"
store# [  126.942655] systemd[1]: thanos-compact.service: Main process exited, code=exited, status=1/FAILURE
2019-07-28 13:28:27 +02:00
Bas van Dijk
ebc65a5f21 nixos/thanos: add module for the thanos service 2019-07-28 13:28:27 +02:00
Orivej Desh
32fbbc6f9b Merge master into staging 2019-07-25 09:23:21 +00:00
Silvan Mosberger
12eb0f524b
nixos/tests: Reenable couchdb
Works just fine in current master
2019-07-24 20:53:02 +02:00
Aaron Andersen
455d33f514 nixos/mediawiki: init service to replace httpd subservice 2019-07-23 22:02:33 -04:00
worldofpeace
b1bc0645ea gdk-pixbuf: rename from gdk_pixbuf 2019-07-22 18:50:57 -04:00