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

nixos/overlayfs: add test #54508

Merged
merged 1 commit into from
Mar 18, 2019
Merged

nixos/overlayfs: add test #54508

merged 1 commit into from
Mar 18, 2019

Conversation

bachp
Copy link
Member

@bachp bachp commented Jan 23, 2019

Motivation for this change

Make sure overlayfs is bahving as intended

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@samueldr
Copy link
Member

Is the rmlint change relevant to the test? I don't think so, with a cursory look.

@bachp
Copy link
Member Author

bachp commented Jan 24, 2019

No it's not. Seems like a mistake from rebasing. I will clean that up.

@bachp
Copy link
Member Author

bachp commented Jan 25, 2019

I remove the rmlint commit. And fixed the append test case. It was wrong before.

The test now successfully runs with Kernel 4.14.

@bachp
Copy link
Member Author

bachp commented Feb 19, 2019

I removed the WIP as I don't see anything preventing this from being merged.

Do I need to add this to some all tests nix file?

@bachp bachp changed the title WIP: Overlayfs test Overlayfs test Feb 19, 2019
@bachp bachp changed the title Overlayfs test nixos/overlayfs: add test Feb 19, 2019
@bachp
Copy link
Member Author

bachp commented Mar 6, 2019

@samueldr What is required to get this merged?

@samueldr
Copy link
Member

Sorry, been really busy lately.

I didn't have an answer for your question ("Do I need to add this to some all tests nix file?").

Though I think (now) that it will need to be added to nixos/tests/all-tests.nix to be more useful at some point. Once done I'd be glad to merge.

@bachp
Copy link
Member Author

bachp commented Mar 15, 2019

@samueldr Added to nixos/tests/all-tests.nix

@aszlig aszlig self-assigned this Mar 15, 2019
@LnL7 LnL7 merged commit a8307b9 into NixOS:master Mar 18, 2019
aszlig added a commit that referenced this pull request Mar 18, 2019
In Linux 4.19 there has been a major rework of the overlayfs
implementation and it now opens files in lowerdir with O_NOATIME, which
in turn caused issues in our VM tests because the process owner of QEMU
doesn't match the file owner of the lowerdir.

The crux here is that 9p propagates the O_NOATIME flag to the host and
the guest kernel has no way of verifying whether that flag will lead to
any problems beforehand.

There is ongoing work to possibly fix this in the kernel, but it will
take a while until there is a working patch and consensus.

So in order to bring our default kernel back to 4.19 and of course make
it possible to run newer kernels in VM tests, I'm merging a small QEMU
patch as an interim solution, which we can drop once we have a working
fix in the next round of stable kernels.

Now we already had Linux 4.19 set as the default kernel, but that was
subsequently reverted in 048c36c
because the patch we have used was the revert of the commit I bisected a
while ago.

This patch broke overlayfs in other ways, so I'm also merging in a VM
test by @bachp, which only tests whether overlayfs is working, just to
be on the safe side that something like this won't happen in the future.

Even though this change could be considered a moderate mass-rebuild at
least for GNU/Linux, I'm merging this to master, mainly to give us some
time to get it into the current 19.03 release branch (and subsequent
testing window) once we got no new breaking builds from Hydra.

Cc: @samueldr, @lheckemann

Fixes: #54509
Fixes: #48828
Merges: #57641
Merges: #54508
aszlig added a commit that referenced this pull request Mar 21, 2019
In Linux 4.19 there has been a major rework of the overlayfs
implementation and it now opens files in lowerdir with O_NOATIME, which
in turn caused issues in our VM tests because the process owner of QEMU
doesn't match the file owner of the lowerdir.

The crux here is that 9p propagates the O_NOATIME flag to the host and
the guest kernel has no way of verifying whether that flag will lead to
any problems beforehand.

There is ongoing work to possibly fix this in the kernel, but it will
take a while until there is a working patch and consensus.

So in order to bring our default kernel back to 4.19 and of course make
it possible to run newer kernels in VM tests, I'm merging a small QEMU
patch as an interim solution, which we can drop once we have a working
fix in the next round of stable kernels.

Now we already had Linux 4.19 set as the default kernel, but that was
subsequently reverted in 048c36c
because the patch we have used was the revert of the commit I bisected a
while ago.

This patch broke overlayfs in other ways, so I'm also merging in a VM
test by @bachp, which only tests whether overlayfs is working, just to
be on the safe side that something like this won't happen in the future.

Even though this change could be considered a moderate mass-rebuild at
least for GNU/Linux, I'm merging this to master, mainly to give us some
time to get it into the current 19.03 release branch (and subsequent
testing window) once we got no new breaking builds from Hydra.

Cc: @samueldr, @lheckemann

Fixes: #54509
Fixes: #48828
Merges: #57641
Merges: #54508
(cherry picked from commit 12efcc2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants