Commit graph

7228 commits

Author SHA1 Message Date
Achilleas Koutsou
61e3fc7f2e Stop testing on Fedora 40 - Start testing on Fedora 42
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-20 10:06:51 +02:00
Tomáš Hozza
664f68ba16 schutzbot/terraform: update ref to the one with F42 config
Update the terraform ref to the one that contains F42 configs. This is
needed to start testing anything on F42.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-20 10:06:51 +02:00
schutzbot
378ca76682 schutzfile: Update snapshots to 20250605 2025-06-18 20:40:14 +02:00
Tomáš Hozza
11d821863e GHA: enable the stale action to delete its saved state
It turns out that the stale action is not able to delete its saved
state due to missing permissions. As a result, it was not processing
issues and PRs, that have been processed once, for almost a month.

The error in the job log was:
```
Warning: Error delete _state: [403] Resource not accessible by integration
```

The fix is to add `actions: write` to the action permissions

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-18 14:38:12 +02:00
Lukas Zapletal
f2bf47814f deps: upgrade go-systemd from v1 to v22 2025-06-16 17:46:45 +02:00
Achilleas Koutsou
5a5e6d732c clouapi: test Disk customization validation
Two new tests are added, one with valid customizations and another with
invalid customizations.
Invalid customizations will return one of two error types, depending on
where exactly the failures was generated.
When the openapi schema fails to validate a request, it will return
IMAGE-BUILDLER-30.
When the error occurs while converting the openapi customizations to the
blueprint types, it will have the IMAGE-BUILDER-35 type instead.
2025-06-16 13:33:20 +02:00
Achilleas Koutsou
45929efbcf cloudapi: validate Disk customization before returining
After converting a Disk customization from the API type to the Blueprint
equivalent, run the validator and return an error if it fails to
validate.
The schema doesn't catch all invalid cases, such as the mountpoint being
required when the fs_type is not "swap", so calling the validator
ensures that any such cases are caught without needing to duplicate the
checks.
2025-06-16 13:33:20 +02:00
Achilleas Koutsou
ea0b5e8661 cloudapi: make fs_type required for filesystems and logical volumes
While technically this is a backwards incompatible API change, the
core blueprint schema didn't allow for empty or undefined fs_type [1,2],
so the general behaviour hasn't changed, we're just catching it early
now.

[1] de18902e3f/pkg/blueprint/disk_customizations.go (L624-L627)
[2] de18902e3f/pkg/blueprint/disk_customizations.go (L677-L680)
2025-06-16 13:33:20 +02:00
Achilleas Koutsou
a03d01c92c cloudapi: make type mandatory for non-plain partitions
The type is required for partitions with a type other than plain.

This commit also adds the empty string to the valid values in the
conversion switch case and is treated like "plain".
2025-06-16 13:33:20 +02:00
Achilleas Koutsou
6cd4bbc6d2 cloudapi: support swap partitions and volume groups
Supporting "swap" as the fs_type requires making the mountpoint an
optional field.  When setting fs_type="swap", the mountpoint must be
empty.
2025-06-16 13:33:20 +02:00
Achilleas Koutsou
edb9b284d5 cloudapi: return http error when failing to convert disk customizations
Return an HTTP error with the invalid customization message when the
convertDiskCustomizations() function returns an error.

Secondary: The conversion was being run twice by mistake.  This has also
been fixed.
2025-06-16 13:33:20 +02:00
Sanne Raymaekers
90f05db135 Schutzfile: add fedora-42
The packer job actually looks for the osbuild dependency that matches
the distro name that it's about to build. So in the case of fedora-42, a
fedora-42 Schutzfile entry is needed.
2025-06-13 12:00:21 +02:00
Simon Steinbeiss
594286f07b fedora-worker-packer: Bump to Fedora 42 2025-06-12 17:03:48 +02:00
Simon Steinbeiss
47b5b8b101 Schutzfile: Bump all osbuild hashes
This completes the change commited as 612a295bf6
2025-06-12 17:03:48 +02:00
Simon Steinbeiss
612a295bf6 Schutzfile: Bump osbuild ref
This is to work around breakage in Fedora Rawhide and Python 3.14.
2025-06-12 15:39:56 +02:00
schutzbot
01f1fcf34b Post release version bump
[skip ci]
2025-06-11 08:17:01 +00:00
Florian Schüller
f26b992fe1 test/cases/oci.sh: Update shape to newer version
As of today it was recommended by oracle to use the
newer shape to be supported longer.
2025-06-06 14:34:04 +02:00
Florian Schüller
f0d39d986f test/cases/oci: improve CI output
Avoid error message where this is no error.
2025-06-06 14:34:04 +02:00
Florian Schüller
1d45104575 test/README.md: add a hint for the OCI env vars 2025-06-06 14:34:04 +02:00
Tomáš Hozza
a1c0edd71d GH Action/create-tag: allow passing the version when run manually
Modify the action to allow passing the version when run manually. This
will be useful in the future once we branch-off a `rhel-x.y` branch to
backport a fix and will be doing the first "dot" release from such
branch.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-05 22:54:33 +02:00
Achilleas Koutsou
c77ca66191 go.mod: update osbuild/images to v0.148.0
tag v0.145.0
Tagger: imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com>

Changes with 0.145.0

----------------
  * github: run dependabot gomod action weekly (osbuild/images#1476)
    * Author: Achilleas Koutsou, Reviewers: Lukáš Zapletal

— Somewhere on the Internet, 2025-05-12

---

tag v0.146.0
Tagger: imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com>

Changes with 0.146.0

----------------
  * Fixes for ESP partition: Make optional, set label (osbuild/images#1525)
    * Author: Alexander Larsson, Reviewers: Achilleas Koutsou, Brian C. Lane
  * Initial automotive work: custom selinux policy, separate build container for bootc, and ext4 verity (osbuild/images#1519)
    * Author: Alexander Larsson, Reviewers: Achilleas Koutsou, Simon de Vlieger
  * Update snapshots to 20250512 (osbuild/images#1515)
    * Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger
  * disk: make auto-generated /boot 1 GiB big (osbuild/images#1499)
    * Author: Ondřej Budai, Reviewers: Achilleas Koutsou, Michael Vogt
  * distro.yaml: Clean up yamllint errors and warnings (osbuild/images#1523)
    * Author: Brian C. Lane, Reviewers: Michael Vogt, Simon de Vlieger
  * distro/rhel9: make /boot 1 GiB everywhere (osbuild/images#1498)
    * Author: Ondřej Budai, Reviewers: Michael Vogt, Simon de Vlieger
  * distro: move disk/container image types into pure YAML (COMPOSER-2533) (osbuild/images#1508)
    * Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  * fedora: move all image types into pure YAML (osbuild/images#1514)
    * Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  * fsnode: fix go-1.24 errors  (osbuild/images#1521)
    * Author: Michael Vogt, Reviewers: Ondřej Budai, Tomáš Hozza
  * osbuild: add JSON/YAML unmarshal to UdevRulesStageOptions (osbuild/images#1489)
    * Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  * test: Run more distro tests in parallel (osbuild/images#1483)
    * Author: Brian C. Lane, Reviewers: Michael Vogt, Simon de Vlieger

— Somewhere on the Internet, 2025-05-19

---

tag v0.147.0
Tagger: imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com>

Changes with 0.147.0

----------------
  * Add support for setting partition uuid and label (osbuild/images#1543)
    * Author: Alexander Larsson, Reviewers: Achilleas Koutsou, Simon de Vlieger
  * Cleanup of new APIs (mkfs options and build container) (osbuild/images#1526)
    * Author: Alexander Larsson, Reviewers: Achilleas Koutsou, Simon de Vlieger
  * distro/rhel: remove the user/group warnings for edge-commits (osbuild/images#1538)
    * Author: Achilleas Koutsou, Reviewers: Brian C. Lane, Simon de Vlieger

— Somewhere on the Internet, 2025-05-20

---

tag v0.148.0
Tagger: imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com>

Changes with 0.148.0

----------------
  * Makefile: add vet command to check for consistent struct tags (osbuild/images#1554)
    * Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger
  * disk: tiny tweaks for the new MkfsOptions support (osbuild/images#1545)
    * Author: Michael Vogt, Reviewers: Achilleas Koutsou, Alexander Larsson, Lukáš Zapletal
  * fedora/many: increase `/boot` to 1 GiB (HMS-8604) (osbuild/images#1557)
    * Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Ondřej Budai
  * fedora/wsl: include `wsl-setup` (HMS-8573) (osbuild/images#1550)
    * Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt
  * fedora: add `anaconda.ModuleUsers` to ImageInstallerImage (osbuild/images#1558)
    * Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  * fedora: implement setting of the RootfsType via YAML (osbuild/images#1544)
    * Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  * rhel10: move ImageConfig into pure YAML (osbuild/images#1542)
    * Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger

— Somewhere on the Internet, 2025-05-26

---
2025-06-05 10:35:58 +02:00
Brian C. Lane
12dd0b0be4 cloudapi: Fix listing composes with empty result
It was returning a null body instead of an empty list.

Related: RHEL-60120
2025-06-05 10:32:56 +02:00
Brian C. Lane
b33f86783f cloudapi: Add artifact cleanup to delete handler
Related: RHEL-60120
2025-06-05 10:32:56 +02:00
Brian C. Lane
56fc58cca3 cloudapi: Add DeleteCompose to delete a job by UUID
This adds the handler for DELETE /composes/{id} which will delete a job and
all of its dependencies, and any artifacts.

Related: RHEL-60120
2025-06-05 10:32:56 +02:00
Brian C. Lane
a569ac0f7b cloudapi: Add DELETE /composes/{id} route to delete a job
This will be used to delete jobs and their artifacts.

Related: RHEL-60120
2025-06-05 10:32:56 +02:00
Brian C. Lane
f1a2c24563 worker: Add CleanupArtifacts function
This removes all artifact directories, and their contents, if there
isn't an associated Job. This is used to clean up local artifacts after
the compose job has been deleted.

Related: RHEL-60120
2025-06-05 10:32:56 +02:00
Brian C. Lane
c3394ae589 jobqueuetest: Add job delete tests
This adds tests for retrieving all root jobs, and deleting jobs
and unused dependencies. These tests are run against the fsjobqueue for
unit testing, and against dbjobqueue for integration testing.

Resolves: RHEL-60120
2025-06-05 10:32:56 +02:00
Brian C. Lane
c06064c1e2 dbjobqueue: Add DeleteJob to database job queue
This adds SQL to delete jobs and dependencies, and implements the
database version of the DeleteJob function.

Related: RHEL-60120
2025-06-05 10:32:56 +02:00
Brian C. Lane
5cddc4223d dbjobqueue: Add AllRootJobIDs implementation
Related: RHEL-60120
2025-06-05 10:32:56 +02:00
Brian C. Lane
d8285a0b74 jobqueue: Add DeleteJob function
This allows jobs to be deleted from the database.
Currently only implemented by fsjobqueue. The function for
dbjobqueue currently returns nil.

This will remove all the job files used by the root job UUID as long as
no other job depends on them. ie. It starts at the top, and moves down
the dependency tree until it finds a job that is also used by another
job, removes the job to be deleted from its dependants list, and moves
back up the tree only deleting jobs with empty dependants lists.

Related: RHEL-60120
2025-06-05 10:32:56 +02:00
Brian C. Lane
5961b69caa jsondb: Add Delete function
This allows database entries to be deleted.

Related: RHEL-60120
2025-06-05 10:32:56 +02:00
Achilleas Koutsou
fd7dc96d06 gitlab: enable OCI tests
The problem with the test infrastructure should be resolved.

This reverts commit d0e805e8be.
2025-06-05 09:29:55 +02:00
Michael Vogt
acec29dea2 osbuild-store-dump: use distrofactory instead of importing fedora
This commit removes the direct use of `pkg/distro/fedora` and
uses `distrofactory` instead. This is the more generic interface,
it also helps with PR#1563 as `pkg/distro/fedora` goes away.

Note that I did not test this but @bcl was kind enough to
mention how this is used:
```
The output from this is used in Test_upgrade in
internal/store/json_test.go, the files there are manually
created when we change the format of the store and add a new
parser to internal/store/json.go -- which hasn't happened in
a long time :)
```
I updated the cmd/README with a snippet of the above.
2025-06-04 12:41:39 +02:00
Tom Koscielniak
488a53e106 tests: Fix failing cross distro test due to osbuild/images pseudo-version
The cross distro test started failing on RHEL 10.1, because the osbuild/images version was a Go pseudo-version that the sed command parsing the version did not recognize.
2025-06-03 17:06:52 +02:00
Tom Koscielniak
b3fab64dcc tests/CI: Fix missing slashes in RHEL 9.7/10.1 baseurl
In repository files for RHEL 9.7 and 10.1, there were missing slashes at the end of the baseurl which caused the satellite regression tests to fail. The refresh job only subs the snapshot dates and leaves the rest of the url unchanged.
2025-06-03 17:06:52 +02:00
Tom Koscielniak
7ed60dbe2e CI: Add tkosciel ssh key 2025-06-03 17:06:52 +02:00
Tom Koscielniak
93684fcef9 tests: Improve logging in api.sh test
Add compose request output print in case of failure.
2025-06-03 17:06:52 +02:00
Tom Koscielniak
557d5f440c tests/CI: Add runners for RHEL 9.7 and 10.1
Add runners for RHEL 9.7 and 10.1 and remove 9.6 and 10.0 runners.
2025-06-03 17:06:52 +02:00
Achilleas Koutsou
d0e805e8be gitlab: disable OCI tests
OCI tests are constantly failing due to a known issue.  A fix is coming
but it's taking a while so let's disable them so we can keep merging
PRs.
2025-05-30 18:56:40 +02:00
Tomáš Hozza
1fc5e2ad18 Packer: use latest RHEL-9 GA Cloud Access images for workers
Update the RHEL-9 Cloud Access images used for our workers from 9.0 to
9.6, which is the latest GA. We do upgrade all packages in our Ansible
playbook, but that is just waste of resources if we can use the latest
GA images.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-30 15:28:37 +02:00
Tomáš Hozza
73ceb94b51 Packer: update Fedora images to F42 and remove workarounds
Update Fedora workers from EOL F40 to F42.

Remove workarounds that should not be needed any more (i.e. the Packer
upstream issue has been closed).

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-30 15:28:37 +02:00
Tom Koscielniak
dee4a5a21b CI: Run RHEL 10 nightly pipeline on PRs
Add RHEL 10 nightly pipeline to PRs as well to avoid test breaking changes being introduced into main.
2025-05-28 11:06:28 +02:00
schutzbot
b825fd8f77 Post release version bump
[skip ci]
2025-05-28 08:14:53 +00:00
schutzbot
8441138d2d schutzfile: Update snapshots to 20250515 2025-05-27 09:22:16 +02:00
Sanne Raymaekers
c3cb3ba785 templates/packer: set wanted-by to cloud-init.target
The `cloud-init.target` in 9.6 has `After=multi-user.target` in its unit
config. The worker initialization service was set to run before
`multi-user.target`, but after `cloud-final.service`. This created an
impossible situation and systemd just disabling the initialization
service.

So this changes:
`multi-user.target -> worker-*.service -> cloud-final.service -> multi-user.target`
to
`cloud-init.target -> worker-*.service -> cloud-final.service -> multi-user.target`.

Thus resolving the loop.
2025-05-14 21:01:39 +02:00
schutzbot
92363cee22 Post release version bump
[skip ci]
2025-05-14 08:15:07 +00:00
Brian C. Lane
4cb47a424d cloudapi: Fix missing specs for koji ContainerResolve
It looks like this got lost in a refactor back in commit 6e4efabf24
when it used to populate the Specs list in a loop.
2025-05-13 20:38:38 +02:00
Lukas Zapletal
0e5d8a94f2 cmd: use log in service-maintenance 2025-05-12 15:20:16 +02:00
Lukas Zapletal
46f0a71053 cmd: use log in jobsite 2025-05-12 15:20:16 +02:00
Lukas Zapletal
71117f3ccc cmd: use log in koji 2025-05-12 15:20:16 +02:00