puppetlabs/Razor — pull request #221 by daniel-pittman (2012-10-17 18:24:20+00:00)
Title: Eliminate MicroKernel path lookups from File server

The MK file server had two API endpoints, for OS images, and for
MicroKernel images. The former was fairly direct - look up a path relative to
the image document root, and serve up the content.

The later was more complex: it would invoke the Razor tool to extract the path
for the component, which was either the kernel or the initrd from the
default MicroKernel.

It would then serve up that content from disk; this gave an abstract URL set
to access that content, unlike the OS images:

/razor/image/mk/kernel
/razor/image/mk/initrd

However, the only place that referenced that content was the default
MicroKernel boot script - an iPXE script that was generated by the `boot
default` REST API slice.

Since that is invoked in the content of the engine, it can return the direct
URL for the MicroKernel images in the script, without needing to go through
the indirection.

That, in turn, allows us to eliminate the extra file server API, and remove a
whole bunch of code. It also eliminates two fork/exec pairs during the boot
process, something that was identifies as costing ~ 1 second under load
in testing.

Signed-off-by: Daniel Pittman