RFC: multiple system configurations in a single image
venture at google.com
Tue Nov 28 08:31:26 AEDT 2017
On Mon, Nov 27, 2017 at 1:14 PM, Brad Bishop
<bradleyb at fuzziesquirrel.com> wrote:
> A new use-case for OpenBMC I'm excited to support is multiple system
> configurations in a single image.
> First, a recap of the current state of affairs.
> No support exists in-tree for this use case today. At the moment
> OpenBMC applications are data-driven using in-memory structures (via
> generated source code). This is the yaml->python->mako pattern you
> might be familiar with.
> Obviously this pattern alone does not enable multiple configurations to
> be supported in a single image so a fundamental change is required.
> One proposal that has been made (out in Gerrit) is to replace the YAML
> with JSON and parse it on the BMC.
> I'll outline what I think the good/not-so-good of this approach are, as
> compared to some other yet-to-be-invented idea for achieving the same
> - low complexity
> - removal of python dependency from application build
Extra pro: you can edit it at run-time and relaunch the application :)
> - complexity shift from build to runtime (parsing, validation)
There is a downside to delayed validation, however, the parsing is a
"one-time" start-up cost for the applications. Also, it might be
cleaner in terms of one system file describing everything that all the
different daemons can parse... there are certainly a few different
approaches to this.
> - loss of implementation freedom of choice (adopting the proposed
> solution _requires_ json parsing on _all_ platforms using reference
> applications, even platforms using single configuration images)
Previously for the most part, we all had to do yaml->cpp, which
certainly had its own drawbacks. I think json will provide a cleaner
mechanism for backwards compatibility. Every platform wont' need to
regularly update their configuration files unless there's a breaking
> I'd like to hear about any of the following:
> - alternative ways to support multiple configurations in a single image
> - items missing from the pro/con list above
> - thoughts on whether or not the cons listed have any meaningful impact
> thx - brad
More information about the openbmc