Skip to content

chrootenv: detect chrootenv-in-chrootenv scenario #32802

Closed

Description

@lukateras

Issue description

chrootenv should detect chrootenv-in-chrootenv scenario and show a more useful error message than unshare: Operation not permitted. It took a lot of head-scratching to identify what's going on.

Steps to reproduce

Run chrootenv inside chrootenv:

$ chrootenv=$(find /nix/store -name \*-chrootenv | head -1)
$ $chrootenv $chrootenv ls
/nix/store/d01wd24jkv781s2psvaccbw66zacxqyx-chrootenv:chrootenv.c:140: unshare: Operation not permitted

Thanks, @bkchr!

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.5, NixOS, 18.03.git.ab1d2a5 (Impala)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 1.11.16
  • channels(root): "overlay, nixos-18.03pre122666.afe9649210c"
  • channels(chronos): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs

Activity

  1. added a commit that references this issue on Dec 20, 2017
    76a3774
  2. lukateras commented on Dec 22, 2017

    @lukateras
    MemberAuthor

    Closed via 710662b.

  3. added a commit that references this issue on Dec 22, 2017
    710662b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions