At kubevirt one can configure the cloud init as config drive or nocloud,
with config drive is the current approch, this change add the nocloud
that spect a device mount with "cidata" label and tue user data file at
/user-data there, also the main different if that on those cases the
network data follows the netplan v1 or v2 that's is better format than
the openstack meta data network service one.
Signed-off-by: Enrique Llorente <ellorent@redhat.com>
When run ignition on a device mapper, ie, multipath, it fails because
the function blockDevHeld returns true as the block device
contains holders. A block device with holders do not necessary means
the block device is in use (like mounted).
The function blockDevInUse will not check if it is a device mapper
and if so, do not check for blockDevHeld.
Signed-off-by: Tiago Bueno <tiago.bueno@gmail.com>
Ignition internal machinery relies on being able to match against an
error directly, in this case, `ErrNeedNet`. By wrapping errors from
FetchToBuffer, ignition would not be able to detect the lack of
networking during `fetch-offline` phase and fail to run.
Signed-off-by: Leorize <leorize+oss@disroot.org>
This commit introduces a new TMT tests and a GitHub Actions workflow to
run it.
TMT (Test Management Tool) is a tool for managing and executing tests
in a structured and efficient manner. It allows users to define test
plans, organize test cases, and execute them in a consistent manner. TMT is
particularly useful for testing software projects, as it provides a
framework for managing the entire testing process, from planning to
execution and reporting.
The workflow is set up to run on every push to the main branch and on
pull requests, providing continuous integration for the project.
The core test added is designed to verify the basic functionality of
the application using TMT, ensuring that it can successfully execute a
simple test case.
The smoke plan is defined in the `tests/tmt/plans/smoke.fmf` file and
is configure to run all tests with smoke tag.
The `tests/tmt/plans/main.fmf` file is the main plan that includes
common configurations and settings for the plans. Currently, it prepare
the test environment.
The workflow is defined in the `.github/workflows/tmt-tests.yml` file
and includes steps to set up the environment, install dependencies, and
run tests. It is allowed to execute on pull requests, pushes to the
main branch, and on demand. By default all tests are executed, but it
can be executed on demand with a TMT plan filter. As part of the
workflow, TMT will be executed inside a container.
JIRA: https://issues.redhat.com/browse/COS-2284
Signed-off-by: Tiago Bueno <tiago.bueno@gmail.com>
Due to #2042 the special mode bits are not functional in versions
=< 3.6.0-exp. Add an experimental spec entry, and move docs
to that sub-section migrating-configs.
Since a bug preventing special mode bits from being applied properly
has been fixed. Move masking of the bits for configs that are in use
which have special mode bits do not suddenly function different.
From https://man7.org/linux/man-pages/man2/lchown.2.html:
> When the owner or group of an executable file is changed by an
> unprivileged user, the S_ISUID and S_ISGID mode bits are cleared.
> POSIX does not specify whether this also should happen when root
> does the chown(); the Linux behavior depends on the kernel version,
> and since Linux 2.2.13, root is treated like other users.
Fixes: #2042
When bootupd/grub2-static/configs.d was introduced,
blscfg was after every config. Some config need to be after blscfg,
so rename to 05_ignition.cfg so we can align bootupd numbering with
legacy grub (blscfg is in 10_linux).
Alpine Linux does not include systemd’s journal, which causes Ignition
to emit warnings when attempting to log. This PR introduces a check to
determine if the journal is available on the current distribution, and
skips logging to the journal when it is not present.
Signed-off-by: Kevin Cui <bh@bugs.cc>
On some providers (like Equinix Metal), there is a network dependency
for the umount stage, network must be still around when ExecStop is
executed.
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Co-authored-by: Dusty Mabe <dusty@dustymabe.com>
Dropped the word 'only' from sentence
Ignition is currently only supported for the following platforms:
Signed-off-by: Geert Stappers <stappers@stappers.it>
The sgdisk tool does not update the kernel partition table with BLKPG in
contrast to other similar tools but only uses BLKRRPART which fails as
soon as one partition of the disk is mounted.
Update the kernel partition table with partx when we know that a
partition of the disk is in use.
trailing \x00 character was making Ignition to fail parsing the config.
It is not always the case, that is why we did not catch it earlier: when
there is no padding in the base64 payload, everything was working.
https://pkg.go.dev/encoding/base64#Encoding.Decode
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>