Previously the blueprint change was only present until a reboot. The
change and its version was recorded, but the actual blueprint was not
saved.
This adds saving the blueprint when it is changed, and loading the old
blueprint versions when they are present in the store.
No version change is needed, if the blueprint is not present it is
loaded as an empty blueprint which was already being detected by
checking the length of the Name.
This will allow specific blueprint changes to be recalled after a
restart of the server.
This also includes tests for the new behavior.
The get_build_info() function uses nvrGreaterOrEqual() to determine how
to parse the output from composer-cli. The function prints the result
of the comparison but is often used in a loop when waiting for a compose
to finish, which makes CI logs very annoying.
Silence the version comparison output when called form get_build_info().
PR#553 [1] introduced a change to the worker subpackage and replaced
the systemd %preun RPM macro with a literal calls to `systemctl` due
to missing functionality in systemd. However, the change omitted the
fact, that the RPM macro executes commands only on package removal,
not upgrade.
As a result a local or remote worker which is running on the system
while the osbuild-composer-worker package is updated, gets stopped.
Fix the scriptlet and run the commands only on package removal.
[1] https://github.com/osbuild/osbuild-composer/pull/553
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
- build simplified installer iso without mentioning FDO section.
- change done for rhel8 and rhel9
- add test case for this use case in test/case/ostree-simplified-installer.shovisioning
- fixed review comments
Signed-off-by: Sarita Mahajan <sarmahaj@redhat.com>
The `/etc/rhsm/ca/redhat-uep.pem` CA is not valid for consumer
certificates.
As a result resolving the ostree ref should use the system's CA cert
pool.
This adds the `fedora-image-installer` and
`fedora-image-installer-preview` images.
The image installer type installs anaconda-webui on Fedora >= 38 to use
the new UI. It also writes its setting to
`/usr/share/anaconda/interactive-defaults.ks` as the current
anaconda-webui has not yet been tested in kickstart mode.
To do so manifest.Anaconda was expanded to take a (subset) of options
for a KickstartStage which is will write into interactive-defaults.ks.
And to take a list of additional modules to enable, so we can set up
Anaconda with all default modules.
When the size of a logical volume is not aligned to the extent size of
the volume group, LVM2 will automatically align it by rounding up[1]:
Rounding up size to full physical extent 29.80 GiB
Rounding up size to full physical extent <3.82 GiB
Since we don't take that into account when we create a new volume or
set the size of an existing one, the size for the whole volume group
will be short by that amount and thus the creation of the last volume
will fail:
Volume group <uuid> has insufficient free space (975 extents): 977 required.
To fix this a new `AlignUp` method is added to the `MountpointCreator`
creator interface. It will align a given size to the requirements of
the implementing container, like e.g. `LVMVolumeGroup`. It is then
used by a new `alignEntityBranch` which takes a size and walks the
entity path, calling `AlignUp` for all entities that implement said
`MountpointCreator` interface; thus the resulting size should fullfil
the alignment requirement for all elements in the path.
NB: `PartitionTable` already had an `AlignUp` method.
Add a corresponding test.
[1]: 8686657664/lib/metadata/metadata.c (L1072)
Co-authored-by: Achilleas Koutsou <achilleas@koutsou.net>
Extract a `CreateLogicalVolume` method from `CreateMountpoint`
and implement the latter via the former. This makes it possible
to create a Logical Volume for an existing payload.
Generated with:
go run ./cmd/gen-manifests -output ./test/data/manifests -cache /var/tmp/manifest-cache/
Includes some changes to ec2-sap manifests due to using the same repos.
It needs to be listed in format-request-map.json, and the repo snapshots
required to depsolve the packages need to be added to repos.json
NOTE: The snapshots are from https://github.com/osbuild/rpmrepo/
This can be shared between cloud providers so move it out of the EC2 SAP
config into its own file and drop the X86_64 from the name (there is
nothing arch specific in it, even if it is only ever used on X86).
Podman doesn't work when installed from 9.1 repositories on 9.0 image.
I found that upgrading the whole system helps. Sadly, that requires removing
python-unversioned-command for some reason.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
Exclude unwanted packages from the EC2-SAP image. These packages have
been pulled into RHEL-9 image due to the fact that we moved away
from using `@core` package group by default and as a result we dropped
explicit package excludes. However the SAP image includes the
`@Server` package group, which pulls in these unwanted packages, thus
we need to explicitly exclude them in the SAP package set.
Related to COMPOSER-1829
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
`amdgpu` module is causing error to be printed in the system log on AWS
instances. After investigation, it turns out that it is not needed.
Disable it by default on all AWS images.
Related to COMPOSER-1807
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
`amdgpu` module is causing error to be printed in the system log on AWS
instances. After investigation, it turns out that it is not needed.
Disable it by default on all AWS images.
Related to COMPOSER-1807
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
F37 no longer ships sil-scheherazade-fonts, but
sil-scheherazade-new-fonts instead. Let's change this. The repos for
test manifests must have been updated in order to get the new package.
Co-authored-by: Ondřej Budai <ondrej@budai.cz>
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
Previously, this just happened silently and let to extremely odd errors. Let's
just print the error to simplify debugging the next time.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
8fdd158799 modified the Cloud API to resolve
ostree commits using a separate job. This change caused the API handler
to call PackageSets without any ostree options (because they are not resolved
yet).
Unfortunately, the new implementation of PackageSets initializes the manifest.
The initialization checks the options and if the type is iot-installer and
it doesn't have the fetch checksum for IoT, it just returns an error.
To work around this (we need an initialized manifest to create the chains),
this commit just gives the initialization method a dummy checksum. The ostree
options currently don't have any effect on the package sets, so this should
be fine.
In order to make this workaround at least slightly sane, a warning is printed,
there's a new test just for this behaviour and a long comment to remember to
delete these lines.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
The new terraform runners support an extended lists of tags to get a
greater precision on the stats we can extract from AWS cost center.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
Don't list specific RHEL repos which should be copied over to the repo
overrides directory, but instead copy all of them, similar to how it's
done for Fedora and CentOS Stream. This is less error prone when support
for a new RHEL release is added to composer.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This can be shared between cloud providers so move it out of the EC2 SAP
config into its own file and drop the X86_64 from the name (there is
nothing arch specific in it, even if it is only ever used on X86).
This fixes a race condition where the context might have been canceled
or timed out in between the preliminary check and trying to dequeue, and
consequently returning the wrong error.
Instead of doing the preliminary check, just check for the context
errors when trying to dequeue.
This fixes a bug where the listen function would keep trying to use a
closed, unrecoverable connection to listen for a notification. This
continued failing, which essentially made the queue instance useless.
The `LVMVolumeGroup.Clone()` method could end up dereferencing a `nil`
pointer in the `lv` variable, if there would be a `nil` logical volume
in the LVM volume group. Such situation would be an error of its own.
There is no point in checking if the cloned logical volume is not `nil`
and casting it to another variable. The logic should check if the cloned
logical volume is `nil` and panic in such situation. The following code
can then cast the clone to a different variable without issues and there
is no risk of dereferencing a `nil` pointer.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>