Skip to content

Feature to support jailing spack inside a chroot jail#5489

Closed
TheTimmy wants to merge 156 commits intospack:developfrom
TheTimmy:features/bootstrap-systemimages
Closed

Feature to support jailing spack inside a chroot jail#5489
TheTimmy wants to merge 156 commits intospack:developfrom
TheTimmy:features/bootstrap-systemimages

Conversation

@TheTimmy
Copy link
Copy Markdown

@TheTimmy TheTimmy commented Sep 26, 2017

This feature support to jail Spack inside a chroot (see #5193 approach 3 for details).
This allows to find potential missing depends_on calls.

It introduces the commands:

./spack isolate --build-environment path/to/jail/dir --tarball path/to/tarball
To create a jail for Spack and mount bind /dev, /sys and /proc to be available inside the jail.

./spack isolate --remove-environment
To unmount the mounted /dev, /sys and /proc directories.

./spack isolate --cli
To start a shell inside the jail.

To create a bootstrap environment it is possible to use an already generated tarball from OpenStack or by using mkosi. A restriction is, that the root directory of the tarball must be a directory which contains the distribution.

Because the mount bind process requires root rights, there are currently three approaches to solve this issue.

  1. By being root user.
  2. By register the /dev, /sys and /proc directories into fstab via the --permanent option, when building the jail with --build-environment. This operation requires to be root.
  3. By starting a daemon via ./spack isolate --start-daemon. This allows every user to mount bind /dev, /sys and /proc to the desired location.
  4. If someone knows a better method I'm happy to change the current one.

alalazo and others added 30 commits May 18, 2016 08:28
- Bugfixes for spack find
- 0.9.1 can read specs from current develop.
tgamblin and others added 24 commits September 26, 2017 11:27
- Bugfixes for spack find
- 0.9.1 can read specs from current develop.
@TheTimmy TheTimmy changed the title Features/bootstrap systemimages Feature to support jailing spack inside a chroot jail Sep 26, 2017
@TheTimmy
Copy link
Copy Markdown
Author

Found a better way to support user chroot in the pull request #5545.

@TheTimmy TheTimmy closed this Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants