1
0
mirror of https://github.com/coreos/ignition.git synced 2026-02-07 03:47:55 +01:00
Commit Graph

90 Commits

Author SHA1 Message Date
Yasmin Valim
195fe2e090 resource: add tests for dual-stack fetching 2025-12-04 12:13:12 -03:00
Steven Presti
7a03aaec18 Add oem to accepted url schemes
Flatcar docs talk about `oem` url add it so ignition-validate
does not fail.

see: https://github.com/coreos/butane/issues/634
2025-11-07 09:56:16 -05:00
Steven Presti
c605d341a4 docs/release-notes: update for 2.24.0 2025-10-14 13:27:14 -04:00
Nikita Dubrovskii
008fe5a160 luks: fix occasional cex.key file removal
1df2238519 broke CEX:
```
[   30.496802] ignition-ostree-growfs[1118]: + cryptsetup resize root --key-file /etc/luks/cex.key
[   30.501834] ignition-ostree-growfs[1257]: Failed to open key file.
```

Issue: https://github.com/coreos/rhel-coreos-config/issues/76
2025-10-10 10:37:46 +02:00
Enrique Llorente
04aefada0c kubevirt: Support nocloud user-data
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>
2025-10-06 15:37:05 +02:00
Tiago Bueno
2d04de325c Fix device mapper partitioning
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>
2025-10-01 16:46:06 -03:00
Steven Presti
a070ac478d docs/release-notes: update for 2.23.0
Update release notes for release.
2025-09-10 09:37:46 -04:00
Jeremi Piotrowski
eebe249b25 docs/release-notes: Add entry for aws-sdk-go-v2 upgrade
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2025-09-04 15:57:17 +02:00
Mara Sophie Grosch
a2703bd7d2 providers/upcloud: add initial support
docs: Add UpCloud provider to release notes
2025-07-30 13:19:17 +03:00
Leorize
f90e2ed300 oraclecloud: do not wrap errors from FetchToBuffer
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>
2025-07-11 15:31:43 -05:00
Tiago Bueno
7a20f8e3cd docs/release-notes: update for 2.22.0
Update release notes for release.

Signed-off-by: Tiago Bueno <tiago.bueno@gmail.com>
2025-07-08 11:20:53 -03:00
Leorize
f69c25ba62 changelog: add entry for oraclecloud
Signed-off-by: Leorize <leorize+oss@disroot.org>
2025-06-09 17:33:57 -05:00
Tiago Bueno
e4b62af541 Add initial tmt test and CI workflow
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>
2025-05-16 19:31:50 -03:00
Steven Presti
1d294ceee9 Merge pull request #2049 from travier/tests-setuid-setgid-sticky
Fix setting setuid/gid bits with uid/gid and add a test
2025-05-12 13:20:42 -04:00
Steven Presti
2203687ef7 config/*: extend special bit validation logic to 3.4.0 and 3.5.0
Extend the warning to trigger on 3.4.0 and 3.5.0 when special
file mode bits are set.
2025-05-05 13:21:22 -04:00
Steven Presti
7c1f02528b config/*: move masking of special mode bits to < 3.6.0
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.
2025-05-05 13:20:15 -04:00
Steven Presti
496804e02e internal/exec/util/file: Set ownership first, then mode
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
2025-05-05 13:12:58 -04:00
Aashish Radhakrishnan
bef4aebdb1 Dockerfile.validate: update to Fedora 42
Ref: https://github.com/coreos/fedora-coreos-tracker/issues/1851
2025-04-24 16:49:30 -04:00
Etienne Champetier
8db6a73a35 Rename ignition.cfg -> 05_ignition.cfg
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).
2025-03-19 09:23:59 -04:00
Steven Presti
ae1d04bba2 docs/release-notes: update for 2.21.0
Update release notes for release.
2025-03-13 16:46:21 -04:00
Joe Doss
e6568e5a7b providers: support for vendor-data in proxmoxve
Add support for reading Ignition data out of the
vendor-data file. No longer clobber the user-data file
2025-03-10 15:56:47 -04:00
Madhu Pillai
8e13a8f520 dracut: correctly add pkey_cca kernel module for cex support
fixes:#2013

Co-authored-by: Timothée Ravier <tim@siosm.fr>
2025-02-13 06:48:49 +01:00
Steven Presti
5f5d863c01 url: add azure blob fetching support for ignition files
use azure sdk to authorize, initiate and fetch ignition config file from azure blob storage.

fixes: https://issues.redhat.com/browse/COS-2859
2025-01-28 13:28:36 -05:00
Michael Armijo
69eb56bffb Dockerfile.validate: update to fedora:41
see: https://github.com/coreos/fedora-coreos-tracker/issues/1695
2024-11-25 14:16:13 -07:00
Kevin Cui
0b340f08a7 exec/engine: log to journal only when available
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>
2024-11-07 13:05:10 +08:00
Steven Presti
461d4f9169 docs/release-notes: update for 2.20.0 2024-10-22 13:33:30 -04:00
Madhu Pillai
df18924263 docs: update for spec stablization 2024-10-14 15:35:03 +02:00
Guilhem Lettron
37c9e60064 feat(akamai): unzip user content 2024-10-12 00:50:20 +02:00
Steven Presti
39aca3c5fc Merge pull request #1942 from k0tran/patch-1
Fix loongarch64 GOARCH value
2024-09-16 14:47:41 -04:00
Ilya Sorochan
54afa54273 docs: add bug fix entry for PR #1942 2024-09-16 17:43:55 +03:00
Mathieu Tortuyaux
6eb35ed45d dracut: add dependency network to ignition-mount.service
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>
2024-09-13 17:45:25 +02:00
Arthur Chaloin
c91991cac1 providers: support for proxmox ve
Co-authored-by: bri <284789+b-@users.noreply.github.com>
2024-07-29 08:57:23 +00:00
Kai Lueke
c2cc56cd02 sgdisk: Run partx after partition changes
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.
2024-06-28 14:49:05 +09:00
Mathieu Tortuyaux
484005607c akamai: fix base64 decoding
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>
2024-06-25 17:10:33 +02:00
Aashish Radhakrishnan
e760ddef38 Dockerfile.validate: update to Fedora 40 2024-06-12 17:01:54 -04:00
Steven Presti
ab900078da docs/release-notes: update for 2.19.0 2024-06-04 14:49:30 -04:00
Madhu Pillai
d078c9fe79 Support LUKS encryption using IBM CEX secure keys on s390x
Extend the `luks` schema to support a new `cex` key. When enabled, the
volume key of the LUKS device uses a secure key generated using a CEX
card. The keyfile to unlock the volume is not considered confidential.

Closes: #1693

Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
2024-05-13 12:25:21 -04:00
Nick Saika
9b833b21f7 providers: add "akamai" provider
The "akamai" provider adds support for retrieving an ignition
configuration from Akamai Connected Cloud's (a.k.a. Linode) [Metadata
Service][1].

See: https://github.com/flatcar/Flatcar/issues/1404
See: https://github.com/coreos/fedora-coreos-tracker/issues/1701
Fixes: https://github.com/coreos/ignition/issues/1508

[1]: https://www.linode.com/docs/products/compute/compute-instances/guides/metadata/

docs: Add Akamai/Linode provider to release notes
2024-04-05 19:40:44 +00:00
Yasmin Valim
a1c90f9667 NEWS: update 2.18.0 2024-03-01 15:50:01 -03:00
Jonathan Lebon
16df241383 azure: retry HTTP requests on codes 404, 410, and 429
For some reason, the Azure IMDS server expects clients to retry their
HTTP requests even on codes that usually would be considered final.
The documented one is 410[[1]], but let's just match the set from
cloud-init, which also includes 404 and 429[[2]].

Closes: #1806

[1]: https://learn.microsoft.com/en-us/azure/virtual-machines/instance-metadata-service?tabs=linux#errors-and-debugging
[2]: https://github.com/canonical/cloud-init/commit/c1a2047cf291
2024-02-08 11:06:27 -05:00
Mathieu Tortuyaux
ce0bf8c643 providers: add scaleway
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2024-02-05 11:34:57 +01:00
Jonathan Lebon
162d1a6a33 stages/files: filter out non-existent paths before relabeling
The code that handles systemd unit enablement via preset will no op if
disabling a systemd unit that is already disabled, which means that we
wouldn't create a preset file in that case. But we did mark the preset
file as needing relabeling unconditionally. Since `setfiles` errors out
if you pass it a path that doesn't exist, this would break boot.

Fix this by filtering out all entries that don't exist right before we
call `setfiles`. Another approach would've been to only mark the file
for relabeling if we actually did write the file, but this is more
complex than it seems because the relabeling logic needs to know what
is the first component in the path that had to be created. So we'd need
logic both before and after file creation.

This isn't user-reported; we hit this in a CI test.
2024-01-16 11:33:52 -05:00
Jonathan Lebon
d525610061 docs/release-notes: tweak dracut module change
This makes the release note item more similar to the language used in our
release notes.
2024-01-16 11:33:12 -05:00
Steven Presti
b8b66d1e7a Bump minimum Go version to 1.20
With go 1.19 being EOL bump to 1.20
2024-01-04 09:51:56 -05:00
Fabian Vogt
569674fc5a dracut: Don't include the ignition module by default
Currently the module is automatically included in all initrds, hostonly or
generic. Leave it to the distro provided module to pull it in explicitly.
2023-11-27 09:09:57 +01:00
Yasmin Valim
c73064e628 NEWS: update 2.17.0 2023-11-20 17:48:18 -03:00
Steven Presti
6a4ef09c99 Merge pull request #1733 from coreos/dependabot/go_modules/google.golang.org/api-0.148.0
build(deps): bump google.golang.org/api from 0.147.0 to 0.148.0
2023-11-06 09:28:22 -05:00
Steven Presti
1db5843289 Bump minimum Go version to 1.19 2023-11-02 11:31:37 -04:00
Brent Baude
5858f58df3 providers/applehv: Add Apple Hypervisor
* Add applehv platform
* Ignintion read from vsock connection with the host

See coreos/fedora-coreos-tracker#1533 and
coreos/fedora-coreos-tracker#1548

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-10-30 21:53:13 +00:00
Jonathan Lebon
5717a50047 stages/disks: retry sgdisk --zap-all invocation
When `wipeTable` is enabled, we run `sgdisk --zap-all`. But if the table
was corrupted in the first place, `sgdisk` will exit with code 2 which
then breaks boot.

As a workaround, Ignition used to retry the invocation but the context
around it was lost in #544 and #1149 and the retry was removed and
the error-checking was added.

So this patch effectively re-applies 94c98bcb ("sgdisk: retry zap-all
operation on failure"), but now with a comment and a test to make sure
we don't regress again.

Closes: https://github.com/coreos/fedora-coreos-tracker/issues/1596
2023-10-25 13:07:27 -04:00