1
0
mirror of https://github.com/coreos/ignition.git synced 2026-02-06 09:47:17 +01:00
Commit Graph

25 Commits

Author SHA1 Message Date
Steven Presti
d9331fc641 test: add -go flag to go tool fix
As of 1.22.7 golang's go tool fix no longer self populates.
you can see the changes here:
676d6100d8 (diff-a4f750f77a9e274ac048407886b3e210cdde1543878d681a6fa96b9d2ec49c23R69)

fixes: #1950
2024-10-11 11:16:11 -04:00
Benjamin Gilbert
2ab78e12f5 internal: move provider registrations out of platforms package
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.
2023-03-29 14:54:26 -04:00
Timothée Ravier
5a2a98a3f1 test: ShellCheck fixes
Fix ShellCheck errors to prepare for enforcing it in CI.
2023-03-06 10:45:45 +01:00
Benjamin Gilbert
880addb8af providers/virtualbox: read config from /Ignition/Config guest property
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.
2021-10-15 14:06:16 -04:00
Benjamin Gilbert
234dc12dd1 test: ensure all platforms are documented
Skip VirtualBox for now, since our current userdata mechanism there isn't
very usable.  Omit "file" since it's a test platform.
2021-10-13 13:58:41 -04:00
Benjamin Gilbert
3375cc8819 test: drop stale comment 2020-12-02 09:13:35 -05:00
Andrew Jeddeloh
65db2f5354 travis: test on arm, use new ubuntu, cleanup
- 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
2019-10-24 08:44:51 -07:00
Andrew Jeddeloh
e6d504b2fe test: turn on docs checking
Now that spec 3.0.0 is stable and the docs are updated, turn on config
checking in the docs.
2019-04-26 09:56:27 -07:00
Andrew Jeddeloh
1314c4bed8 test: don't validate docs
All the docs examples are from the 2.x spec and should fail anyway, stop
checking them until we update all the docs.
2019-03-15 14:24:16 -07:00
Stephen Lowrie
62b617c4f3 vendor: switch to go modules
With the release of golang 1.12 go modules have been improved in
preparation for being the new default in golang 1.13.
2019-03-06 12:15:33 -06:00
Derek Gonyeo
3bbfe9499e test: add check for license header on go files
Modify the test script to check for the Apache License header on all go
files in config, internal, validate, and test. Fails if the header is
missing.
2018-03-08 16:03:11 -08:00
Andrew Jeddeloh
78cab2ad3f test: add docs checker to test script 2018-01-23 13:37:01 -08:00
Andrew Jeddeloh
9c4257fbf6 tests: make running bb tests locally easier
Move building blackbox tests into its own script. Allow use of host
system paths for binaries whith HELPERS=HOST.
2018-01-02 15:38:57 -08:00
Andrew Jeddeloh
64b985ae55 test: only compile bb tests with ACTION=COMPILE
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.
2017-12-18 16:41:12 -08:00
Stephen Lowrie
62ebf33e1f test: add option to compile tests via environment variable
Used for blackbox testing, if the ACTION variable is set to
'COMPILE' rather than running the tests they will be compiled into
`.test` files.
2017-09-05 13:13:00 -07:00
Dalton Hubble
2a9b7884cb glide.yaml: add glide.yaml and remove manual vendoring
* Pin dependencies that were previously pinned by hand
* Add hack to keep vendoring update-ssh-keys despite its symlink
structure
2017-06-12 12:53:28 -07:00
Alex Crawford
1a1438c3cd build: don't hardcode path to bash 2017-02-22 17:34:53 -08:00
Alex Crawford
58c1dd72cc build: fix up test script
Packages were being missed in the test pass. This will pull them all in.
2016-04-01 14:38:49 -07:00
Alex Crawford
4a1e8353d5 *: rename src package to internal
This will prevent Ignition's implementation from being imported.
2016-03-31 17:42:22 -07:00
Alex Crawford
3dc071936a config: move package out from under src 2016-03-31 17:09:00 -07:00
Alex Crawford
72dee8a668 config/v1: add v1 configuration package 2016-03-29 14:41:10 -07:00
Alex Crawford
60c7dda285 test: add missing packages 2016-03-14 14:07:28 -07:00
Alex Crawford
ba8d5844da main: remove providers flag
The provider is now specified by the OEM configuration.
2016-02-24 18:33:25 -08:00
Alex Crawford
9523eb4ae3 build: fail when gofmt finds a diff
gofmt is so shitty it doesn't return non-zero when the code is
improperly formatted.
2015-09-08 17:16:54 -07:00
Vito Caputo
4b06dec1e6 build: eliminate Makefile and derive version from git describe
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.
2015-08-11 14:21:33 -07:00