Move provider registrations next to the code that implements the provider,
as we do with stages. This allows us to make the provider functions
private and only expose them through the registration.
To do this, we need to make the fields of the registration struct public,
which could allow the rest of Ignition to call directly through the
function pointers. To avoid this, we wrap the registration struct when
exposing it to the rest of Ignition, ensuring that accessors are used.
VirtualBox supports "guest properties", which are persistent UTF-8
key-value pairs accessible from both the host and guest. Property values
were originally limited to 128 bytes, and the VirtualBox codebase still
contains vestiges of that limit, such as fixed-size buffers in some client
code. The limit is no longer enforced by the VirtualBox core; it seems to
have been removed in r21629 in 2009.
Read Ignition configs from an /Ignition/Config guest property by talking
directly to the upstream vboxguest kernel module via /dev/vboxguest.
Ignition configs can be attached to a VM with something like this command:
VBoxManage guestproperty set vm-name /Ignition/Config "$(cat config.ign)"
When using this approach (rather than the VirtualBox XPCOM API), configs
are subject to these limits:
Linux: 128 KiB (MAX_ARG_STRLEN)
macOS: 256 KiB (ARG_MAX)
Windows bash: 32 KiB (UNICODE_STRING.MaximumLength)
Windows cmd.exe or PowerShell: 8 KiB
(The limits are actually slightly lower for various reasons.)
For forward compatibility, check that the /Ignition/Config/Encoding
property is missing or empty. In the future we might want to support
alternate encodings (e.g. gzip+base64), similar to the VMware provider.
Drop support for the old magic partition GUID. It was implemented for
the old Container Linux Vagrant provider, which was never widely deployed.
It isn't practical for hand-crafting a config drive, since it requires
creating a disk image with a partition table and then inserting the config
into a partition, and I'm not aware of any active users in the wild.
Fixes https://github.com/coreos/ignition/issues/629.
- Actually test on arm64
- Don't build BB tests since we're not running them. This was a
holdover from before we had jenkins set up to run those.
- Use ubuntu bionic
- General cleanup
- Bump max go version to 1.13
- Test with 1.12.x instead of 1.12.0
Do not compile unit tests when using ACTION=COMPILE. This makes running
./test with ACTION=COMPILE much faster.
Additionally retab the file; it had mixed indentation.
This eliminates the need for version commits, we just add tags referring
to the merge of the NEWS commit.
The Makefile was just a nuisance and we weren't taking advantage of any
of the dependency/incremental build features.