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

Action Images are very tightly tied to OSIE #136

Closed
grahamc opened this issue May 26, 2020 · 3 comments
Closed

Action Images are very tightly tied to OSIE #136

grahamc opened this issue May 26, 2020 · 3 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/design Categorizes issue or PR as related to design. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@grahamc
Copy link
Contributor

grahamc commented May 26, 2020

Tink starts by booting OSIE, OSIE runs the workflow engine, the workflow engine runs some Action Images via docker containers, and hopefully at the last step in the workflow the system boots in to the freshly installed OS.

These Action Images, though, are limited by what OSIE can do. In fact, this binding is quite tight and probably by mistake.

Some examples of this:

  • BSDs can't really do a "native" installation by running their own software, they have to first create an installer which works under Linux.
  • Windows is similar, probably closer to spewing bytes to disk than anything else.
  • The OS must install to a filesystem supported by OSIE
  • Hardware must be supported by OSIE. Action Images can't bring their own hardware support
  • Lots of tools actually have to be "matched pairs": where the CLI utility version is tied to a specific version of the kernel module. For example: wireguard, zfs, iptables, nvidia, among many others. Incompatibilities can cause simple breakage, instability, or crashes.

One way I was able to get around this this was by:

  1. use a privileged docker container to mount /etc
  2. examine /etc/issue
  3. create a docker container on the fly based on that version of alpine
  4. build the packages I required
  5. export them to a package archive
  6. use a privileged docker container to mount the host's / to /hostroot in the container
  7. chroot /hostroot apk add ... to install my required kernel modules to the host
  8. chroot /hostroot modprobe ... to load the kernel modules

but this is not actually a viable solution. In particular, I was stuck in mud for a bit by osie using a somewhat / lightly patched version of alpine's kernel, making it tricky to do this custom build.

Some different ways to work around this might be:

  1. support Action Images being light-weight VMs, via something like qemu.

This option is most flexible as these VMs could be minimally small but support exactly the hardware and VM the user needs. Further, they can be built with matched pairs of kernel modules to CLI tools.

  1. allow a workflow to specify its own URL or ID or name for its OSIE workflow base

This is probably desirable anyway. Like I mentioned the Action Images are quite tightly tied to what the host provides. This sort of binding can be hard to upgrade, especially when the purpose of the action images are to fiddle bits with the hardware. Being able to pin and version them would likely help a lot.

@gauravgahlot gauravgahlot added the triage/discuss Indicates a PR or issue that requires discussion label May 26, 2020
@splaspood splaspood added the kind/design Categorizes issue or PR as related to design. label Nov 2, 2021
@nshalman
Copy link
Member

nshalman commented Nov 2, 2021

With the sandbox moving to https://github.com/tinkerbell/hook is this still an issue, @grahamc?

@jacobweinstock jacobweinstock added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Nov 30, 2021
@jacobweinstock
Copy link
Member

I think "support Action Images being light-weight VMs, via something like qemu." would be really cool. I've added a help wanted label because I think we need someone to build a demo/proof of concept for this idea.

@jacobweinstock jacobweinstock added kind/feature Categorizes issue or PR as related to a new feature. and removed triage/discuss Indicates a PR or issue that requires discussion labels Nov 30, 2021
@chrisdoherty4
Copy link
Member

I've raised a discussion in the Tinkerbell Roadmap where we can figure out if and what we could do for this. Closing the issue as we don't necessarily intend on fulfilling it.

tinkerbell/roadmap#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/design Categorizes issue or PR as related to design. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

6 participants