Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixosTests.docker-preloader: Port to Python #80051

Merged
merged 2 commits into from Aug 23, 2020

Conversation

@tfc
Copy link
Contributor

@tfc tfc commented Feb 13, 2020

Motivation for this change

#72828

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@tfc tfc requested review from flokli and worldofpeace Feb 13, 2020
@tfc
Copy link
Contributor Author

@tfc tfc commented Feb 13, 2020

@GrahamcOfBorg test docker-preloader

@flokli
Copy link
Contributor

@flokli flokli commented Feb 13, 2020

@tfc Did this succeed on your machine? Seems to fail on ofborg:

open /var/lib/docker/overlay2/e15685a6d503df5e91f284dccf1fe62a2fddbe3db41c4386b883edad8ff1eb13/committed: read-only file system"
@tfc
Copy link
Contributor Author

@tfc tfc commented Feb 14, 2020

@flokli weird. Yes, it works on both my machines.

@worldofpeace
Copy link
Member

@worldofpeace worldofpeace commented Feb 14, 2020

@GrahamcOfBorg test docker-preloader

@worldofpeace
Copy link
Member

@worldofpeace worldofpeace commented Feb 14, 2020

Fails on my machine

docker # [   14.307652] dockerd[856]: time="2020-02-14T19:17:53.392910714Z" level=error msg="Handler for POST /v1.40/containers/create returned error: open /var/lib/docker/overlay2/7efbea82c8cbd126c34d5e5fa5111fd4349c2034dc7a320627fb9c80f0e31dfd/committed: read-only file system"
docker # /nix/store/6sfqhlii23k5fhpwpzv2gwrzfpdwsawi-docker-19.03.5/libexec/docker/docker: Error response from daemon: open /var/lib/docker/overlay2/7efbea82c8cbd126c34d5e5fa5111fd4349c2034dc7a320627fb9c80f0e31dfd/committed: read-only file system.
docker # See '/nix/store/6sfqhlii23k5fhpwpzv2gwrzfpdwsawi-docker-19.03.5/libexec/docker/docker run --help'.
docker: output:
error: command `docker run nix nix-store --version` failed (exit code 125)
cleaning up
killing docker (pid 9)
(0.00 seconds)
@flokli
Copy link
Contributor

@flokli flokli commented Feb 18, 2020

@tfc this also failed for me, when running nix-build -A nixosTests.docker-preloader from a checkout of this branch:

docker # [   12.618288] dockerd[841]: time="2020-02-18T16:57:15.186850000Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
docker # [   12.626016] systemd-udevd[532]: Using default interface naming scheme 'v243'.
docker # [   12.647880] systemd-udevd[532]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
docker # [   12.890340] dockerd[841]: time="2020-02-18T16:57:15.458796574Z" level=info msg="Loading containers: done."
docker # [   13.089265] systemd[1]: var-lib-docker-overlay2-opaque\x2dbug\x2dcheck242620588-merged.mount: Succeeded.
docker # [   13.096296] dockerd[841]: time="2020-02-18T16:57:15.664879191Z" level=info msg="Docker daemon" commit=633a0ea838f10e000b7c6d6eed1623e6e988b5bc graphdriver(s)=overlay2 version=19.03.5
docker # [   13.100627] dockerd[841]: time="2020-02-18T16:57:15.669026366Z" level=info msg="Daemon has completed initialization"
docker # [   13.182081] systemd[1]: Started Docker Application Container Engine.
docker # [   13.186243] systemd[1]: Reached target Multi-User System.
docker # [   13.188691] systemd[1]: Startup finished in 3.386s (kernel) + 9.794s (userspace) = 13.181s.
docker # [   13.198959] dockerd[841]: time="2020-02-18T16:57:15.756404510Z" level=info msg="API listen on /run/docker.sock"
docker # [   13.216920] dockerd[841]: time="2020-02-18T16:57:15.785408476Z" level=error msg="Handler for POST /v1.40/containers/create returned error: open /var/lib/docker/overlay2/dad7ff32c10de4660ec848025acfcd2c2fdf7534d215603acb01f0275e551849/committed: read-only file system"
docker # /nix/store/6sfqhlii23k5fhpwpzv2gwrzfpdwsawi-docker-19.03.5/libexec/docker/docker: Error response from daemon: open /var/lib/docker/overlay2/dad7ff32c10de4660ec848025acfcd2c2fdf7534d215603acb01f0275e551849/committed: read-only file system.
docker # See '/nix/store/6sfqhlii23k5fhpwpzv2gwrzfpdwsawi-docker-19.03.5/libexec/docker/docker run --help'.
docker: output:
error: command `docker run nix nix-store --version` failed (exit code 125)
cleaning up
killing docker (pid 9)
(0.00 seconds)
builder for '/nix/store/wip3apvpmxykhdyk28mf84vszb1n5w57-vm-test-run-docker-preloader.drv' failed with exit code 1
error: build of '/nix/store/wip3apvpmxykhdyk28mf84vszb1n5w57-vm-test-run-docker-preloader.drv' failed
@tfc
Copy link
Contributor Author

@tfc tfc commented Apr 22, 2020

It finally fails on my systems, too. I wonder how/why it ever worked, as the commit that introduces this module maps the images RO: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/docker-preloader.nix#L92

However, i have no idea how to fix this without modifying the module (possible to the worse). @nlewo any idea?

@flokli
Copy link
Contributor

@flokli flokli commented Aug 23, 2020

docker-preloader seems to still fail on current master. This PR doesn't apply due to some editorconfig changes.

@tfc As this port is fairly trivial, can you rebase this PR to latest master, and mark it as broken?

tfc and others added 2 commits Feb 13, 2020
@flokli flokli force-pushed the tfc:port-docker-preloader-test branch from 1861162 to 33905f8 Aug 23, 2020
@flokli
Copy link
Contributor

@flokli flokli commented Aug 23, 2020

nvm, I did the rebase, and marked it as broken in a follow-up commit.

@flokli flokli merged commit adc5918 into NixOS:master Aug 23, 2020
@flokli
Copy link
Contributor

@flokli flokli commented Aug 23, 2020

Huh, I missed #93791.

@flokli flokli mentioned this pull request Aug 23, 2020
0 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.