Commit Graph

16 Commits

Author SHA1 Message Date
David Anderson
a44cef6d7b Add an advanced option to pass in a raw iPXE script.
The feature is heavily laced with warnings and a complete lack of
promises around future compatibility. But within those parameters,
it might allow some people to do cool things.

Fixes #60.
2018-02-03 21:25:55 -08:00
David Anderson
4ffbe802e0 Log timing of /_/ipxe for #32. 2017-03-01 14:36:07 -08:00
David Anderson
4e411248b1 Improve the comment explaining why handleBooting returns an iPXE script. 2017-02-24 15:30:38 -08:00
Phenix Rizen
a9d71481f7 handleBooting should return a no-op script, not an error.
Responding with an error makes iPXE print a misleading error message (misleading because it doesn't break the boot in any way, it just makes humans uncomfortable).
2017-02-24 15:22:11 -08:00
David Anderson
a762c94d61 Only try to parse the MAC address if the file has a known type.
Parsing unconditionally logs errors when serving non-kernel/initrd
files.
2017-02-20 17:43:59 -08:00
pancho horrillo
d1e0ba49c4 Add missing param 'name' to log entry text (#12)
Also add a missing closing parens in the textual description.
2016-09-22 21:24:17 -07:00
David Anderson
8e5c0d0793 pixiecore: Add a basic HTTP status UI.
The UI is optional and need to be explicitly activated, since I
don't want existing users to suddenly have an information-spewing
thing show up on their network.
2016-09-19 03:43:57 -07:00
David Anderson
5f1d91239d pixiecore: Add a warning that no Content-Length will massively slow down booting. 2016-09-14 20:58:06 -07:00
David Anderson
3aa769557c pixiecore: set Content-Length when serving the kernel/initrd.
iPXE appears to have *really* poor performance (orders of magnitude worse) if
it doesn't know the length of the kernel/initrds that it's downloading. Without
this change, booting CoreOS takes longer than I've had patience to wait. With
this change, the bottleneck becomes the network transfer speed.

Fixes #10.
2016-09-14 20:54:04 -07:00
David Anderson
0e0eaa8454 pixiecore: implement orderly shutdown on error or request. 2016-08-16 00:18:23 -07:00
David Anderson
8aa6f59cad pixiecore: give the error message when getting a file by ID fails. 2016-08-15 23:23:32 -07:00
David Anderson
4aa8885728 pixiecore: rework logging to provide less verbose, more useful logs by default.
Also adds a debug channel with the full line noise.
2016-08-15 21:33:57 -07:00
David Anderson
4941f47975 pixiecore: switch Spec.Cmdline from a map to a templated string.
The main difficulty in passing a commandline as a plain string is
that you sometimes want to encode IDs into it, to tell your kernel
to fetch something via Pixiecore. Solving that problem with maps is
a bit clunky. Instead, now we use a text/template {{ ID "foo" }} to
mean "make a URL that, when fetched, reads the file "foo" from the
Booter.
2016-08-14 21:22:17 -07:00
David Anderson
6a88cefc9b pixiecore: factor the ipxe script generation out of the HTTP handler.
This makes it easier to test the script generation in isolation,
as well as making the whole thing easier to follow.
2016-08-10 21:54:16 -07:00
David Anderson
2b4d1e8101 pixiecore: replace fmt.Print* with a user-customizable logging function.
Also introduces a "Trace" member to the API, for the future addition of
extremely verbose and complete tracing, to be used for bug reports. But
for now, only Log is used.
2016-08-10 21:36:47 -07:00
David Anderson
e440f01741 pixiecore: new version of Pixiecore, using netboot libraries.
This version is still *extremely* barebones, and the unstable tag
in the README applies triple for it, but the code in its current
state is capable of booting x86 and UEFI clients correctly, and
that was hard enough to merit a snapshot checkpoint.
2016-08-09 00:19:08 -07:00