micro-patch for setup-storage

Thomas Neumann blacky+fai at fluffbunny.de
Tue Aug 28 09:43:44 CEST 2012


> Why not use setup-storage without -X which prints all commands without
> executin them?

Ah. Yes. Forgot about it since I started rewriting setup-storage so it
doesn't need root-priviledges for a dry-run. (e.g. setup-storage without
'-X' will still happily try to stop md devices and access the raw disk
device)

Progressed a bit into it, but I need to touch a lot of code, so I returned
back to the start and now use a fai-client with no tasks as starting
point.

Rationale: I want to employ test driven development while hacking around
in setup-storage internals. Different disk_configs with their expected
output are my test-cases. That way I can make sure that none of my changes
will start to generate invalid configs.

Later on I want to be able to switch back to root-privilege-less testing.
The goal is to be able to feed setup-storage user-specified input instead
of actually calling 'parted', 'lvscan' etc.

Maybe there are other ways to achieve this. I'm doing it this way because
it's a nice lesson in code-refactoring.



More information about the linux-fai mailing list