coreos / coreos/coreos-assembler

rework iscsi tests architecture

Open
#3,791 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
393
Forks
193
Avg merge
17h 6m
Merged PRs (30d)
5

Description

Right now we have two iscsi tests (and will soon have a 3rd) that all:

  1. start a VM
  2. pull down/start a targetd container
  3. Run coreos-installer to do an install with iscsi kargs set
  4. pull down coreos-assembler container to:
  5. spin up a nested VM using iPXE with sanboot options set

This makes for an extremely heavyweight test. It downloads two containers (cosa being a really large one) and relies on nested virtualization, which apparently doesn't work on multiarch.

I suggest that we re-architect this such that we

  • start one VM to run targetd
    • needs to be a VM and not just a process started by COSA because targetd requires a kernel module.
  • start other VMs (not nested) to run the individual tests
    • they will talk to the initially started VM
      • of course, qemu user mode networking presents a challenge here, but I think we can handle it

The idea here is that if a single one of the tests are called they will spin up the initial VM and run the test, but if multiple of the tests are called then the initial VM will only need to be setup once.

Benefits of this approach:

  • pulls targetd container once per test run (versus 3 times)
  • does not pull coreos-assembler container at all
    • this also was problematic anyway because the cosa container we were pulling could be a different version than the COSA we are initiating this whole test from
  • does not rely on nested virtualization

One potential model we could follow for this is what is currently done for the luks/tang tests in:

https://github.com/coreos/coreos-assembler/blob/79b15c89d57a4b97334c70881b036aee3462f1e4/mantle/kola/tests/ignition/luks.go#L124

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked luks/tang test architecture in mantle/kola/tests/ignition/luks.go around line 124, then locate the existing iSCSI tests. Compare their VM, targetd, coreos-installer, and nested-VM setup with the proposed shared targetd VM model. Done means individual tests work independently, multiple tests reuse the initial VM, and nested virtualization and the coreos-assembler container are no longer required.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.