Commit graph

1346 commits

Author SHA1 Message Date
Tom Gundersen
b7fb52dc7d 20
Release osbuild-composer version 20.
2020-08-23 16:44:07 +02:00
Lars Karlitski
b5bd00d739 dnf-json: don't initialize dnf plugins
acf91a4 enabled fastestmirror but also calls `base.init_plugins()` to
initialize dnf plugins. This is not necessary and not what we want
conceptually.

Not necessary, because `fastestmirror` is a dnf built-in (it was a
plugin during yum-times [1]). The same patch sets the `fastestmirror`
option as well. Thus, this patch does not revert functionality.

Not what we want, because we're using dnf more as a library, explicitly
passing all options. Plugins depend on additional host configuration,
which we'd like to avoid pulling in. In particular, the
subscription-manager plugin tries reading certificates in `/etc/pki`,
which are not readable by the `osbuild-composer` user. This leads to
these errors in the journal:

    [ERROR] dnf-json:54297:MainThread @logutil.py:194 -
      [Errno 13] Permission denied: '/var/log/rhsm/rhsm.log' -
      Further logging output will be written to stderr
    [ERROR] dnf-json:54297:MainThread @identity.py:156 -
      Reload of consumer identity cert /etc/pki/consumer/cert.pem
      raised an exception with msg:
      [Errno 13] Permission denied: '/etc/pki/consumer/key.pem'

These errors are not fatal, but could confuse people when inspecting
logs to find unrelated problems. This patch makes them disappear.

[1] https://fedoraproject.org/wiki/Yum_to_DNF_Cheatsheet
2020-08-23 16:08:25 +02:00
Tom Gundersen
496f921eff schutzbot: don't boot-test vmdk images in libvirt
The vmdk images are meant to be imported into VMWare vCenter, not to be
booted directly.

Our image-info tests verifies that this work, they should be converted
into integration tests similar to the aws.sh script in the future.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-08-23 14:45:27 +02:00
Tom Gundersen
b0cd29f78b worker: support returning returning images as StreamOptimized
vCenter requires images to be uploaded as vmdk StreamOptimized. Lorax
always produced images on this format, so we should make sure to do the
same for our VMWare images.

Allow LocalTarget to request the images produced by osbuild be converted
to be streamOptimized before saving in composer, and hook the weldr API
up to enable this option for vmdk images.

Ideally this should simply be an option in osbuild, but that would
require some more work, which we will not manage in time for RHEL8.3.
Therefore do this minimal fix.

Note that that means the images produced by our manifests (including in
our image-test test cases) are not on the format that the weldr API
returns, so the tests we run on them would also, for now, need to
convert before uploading to vCenter.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-08-23 14:45:27 +02:00
Alexander Todorov
bdea79613c Return a string from runWithStdout() instead of []byte
and trim invisble newlines b/c they were messing up with ssh
2020-08-20 21:59:54 +02:00
Tom Gundersen
f3cba8ecfc vmwaretest: avoid using the cli
This is not shipped in RHEL, so use the library directly to query the IP
address. This is a massive hack, but let us revisit this after the next
release.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-08-20 21:59:54 +02:00
Alexander Todorov
5a395cda38 tests: manually convert to streamOptimized vmdk 2020-08-20 21:59:54 +02:00
Alexander Todorov
dcee05d8b6 Read vCenter credentials for Schutzbot & document them 2020-08-20 21:59:54 +02:00
Alexander Todorov
9cce43d384 tests: upload & test in vCenter. Closes #338 2020-08-20 21:59:54 +02:00
Alexander Todorov
02346faff8 Use /var/tmp for temporary files for image-info 2020-08-20 21:59:54 +02:00
Tom Gundersen
dc5434d627 schutzbot/deploy: do not override repos when deploying on 8.2
We will automatically detect whether to use GA or Beta content, so we
can drop the override as 8.2 is GA so will get GA content.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-08-19 15:06:21 +02:00
Tom Gundersen
cc677dea3c repositories: distinguish between RHEL8 beta and GA
We need the same RPMs to work equally well on a host running a beta
release (pulling beta content) as on a machine running GA (pulling GA
content). Detect this at run-time and point at the right repository.

Testing this is a bit hairy as we are building 8.3 images, but obviously
there is currently no 8.3 content at the GA URLs.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-08-19 15:06:21 +02:00
Tom Gundersen
a2f8a06e79 weldr/upload: don't expose AWS/Azure acconut details
Change the translation from our internal structs to the structs used for
weldr serialization to drop account details. These must obviously be
passed in to configure an upload, but exposing them in the logs may be
surprising.

There is no notion of user accounts in the weldr API, and the state
should not be considered private. However, this is likely to take people
by surprise, so let us guard the secrets entrusted to us.

Fixes #907.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-08-18 08:55:57 +02:00
Major Hayden
5d7aa2f699 Add friendly message for logs on running build
Improve the message returned by osbuild-composer when a user asks for
logs of a compose that is still running.

Signed-off-by: Major Hayden <major@redhat.com>
2020-08-17 09:10:50 +02:00
Major Hayden
20e64fa519 🐣 Bump osbuild to v20
Move the osbuild submodule to v20 to get that fresh new code. 🍞

Signed-off-by: Major Hayden <major@redhat.com>
2020-08-14 02:43:58 +02:00
Brian C. Lane
5471bd7f30 store: Add newImageBuildFromV0 test 2020-08-13 17:47:57 +02:00
Brian C. Lane
02ef8a7174 store: Add newComposesV0 and newComposesFromV0 tests 2020-08-13 17:47:57 +02:00
Brian C. Lane
428d1f9478 store: Add newComposeV0 and newComposeFromV0 tests 2020-08-13 17:47:57 +02:00
Tom Gundersen
06c8461684 19
Release osbuild-composer 19.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-08-10 21:46:25 +02:00
Jenn Giardino
1e57cbdad6 Add diagrams for other API layers (cloud and koji)
Also makes one minor formatting change to the original diagram
2020-08-10 19:47:39 +02:00
Jenn Giardino
bf10ed0fd1 readme: Update API diagram 2020-08-08 00:25:06 +02:00
Alexander Todorov
adc384002d Document which ENV variables are needed for testing in OpenStack 2020-08-07 19:58:37 +02:00
Alexander Todorov
b136332c7f Provide OpenStack environment for image tests
in the same way this is done for Azure we read the OS credentials
and provide them as ENV variables for the test

Note: uses `psi-openstack-creds` and not `psi-openstack-clouds-yaml`
which is a yaml file.
2020-08-07 19:58:37 +02:00
Alexander Todorov
0469be7a22 tests: Change boot typo to openstack. Refs #876
this will cause the images to be uploaded and booted in our
OpenStack cluster.
2020-08-07 19:58:37 +02:00
Brian C. Lane
55136323c5 store: Add newSourceConfigsFromV0 and newSourcesV0 tests 2020-08-06 15:25:02 +02:00
Brian C. Lane
542dfc4ec2 store: Add newChangesFromV0 and newChangesV0 tests 2020-08-06 15:25:02 +02:00
Brian C. Lane
79b84fe52f store: Add newWorkspaceFromV0 and newWorkspaceV0 tests 2020-08-06 15:25:02 +02:00
Brian C. Lane
f0e2f01421 store: Add newBlueprintsFromV0 and newVlueprintsV0 tests 2020-08-06 15:25:02 +02:00
Brian C. Lane
45f3901a6a store: Add newCommitsV0 tests 2020-08-06 15:25:02 +02:00
Major Hayden
a93143ea0c mockbuild: Fix path to latest repo
Using `cp` to copy the repo content caused the last part of the path to
be duplicated:

  Current: `master/latest/rhel82_x86_64/rhel82_x86_64/repodata/repomd.xml`
  Desired: `master/latest/rhel82_x86_64/repodata/repomd.xml`

Remove the VERSION_ID/ARCH from the destination to remove the duplicated
path.

Signed-off-by: Major Hayden <major@redhat.com>
2020-08-06 00:15:38 +02:00
Brian C. Lane
be2ce10b75 weldr: Fix out of range index for missing toml blueprint freeze
The API was crashing if the freeze request was called on a non-existent
blueprint. This changes it to return an empty string, matching
lorax-composer's behavior (since the output is toml it shouldn't return
json).
2020-08-05 11:43:35 +02:00
Martin Sehnoutka
55c86afaa6 test cases: fix f32 iot commit inputhash
The inputhash represents pipeline id, which is calculated from the
pipeline dictionary defined in the test case. The definition has been
modified without correction of the inputhash (because we did not run it
in our CI :-) ).

This patch fixed the inputhash to reflect the changes in the pipeline.
2020-08-03 17:46:49 +02:00
Martin Sehnoutka
b6e1e8b4ce schutzbot: don't skip image test for fedora iot commit
The SELinux bug has been fixed so there is no need to skip it.
2020-08-03 17:46:49 +02:00
Brian C. Lane
ec19003b70 store: Fix copy failure when initializing blueprints commit list
copy() will not append to a slice, so if the length is 0 nothing will be
copied. Initialize the slice with the length instead of the capacity.

This fixes a problem with blueprint commits vanishing when the server is
restarted.

This commit also includes a new test in json_test for the
newCommitsFromV0() function.
2020-08-02 11:21:20 +01:00
Major Hayden
093117559e 🦘 Skip checkout on prepare
Checking out the code from git during the prepare step is a waste of
time and disk space since we don't need the git repository cloned there.

Signed-off-by: Major Hayden <major@redhat.com>
2020-08-02 11:17:11 +01:00
Major Hayden
edc574065a 🤸🏻 Bump osbuild to v19
Update the osbuild submodule so that osbuild-composer is tested against
osbuild 19.

Signed-off-by: Major Hayden <major@redhat.com>
2020-08-02 11:13:41 +01:00
Major Hayden
8da3d58213 mockbuild: Remove rsync
Although rsync works just fine, it would reduce our package list if we
just used `cp` to create the latest repo.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-30 18:15:38 +02:00
Major Hayden
fe1777102e 🏠 Keep RHEL 8 image tests internal only
The image tests for RHEL 8 still download packages from a server that is
only available inside the Red Hat network. 😢

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-30 18:15:17 +02:00
Major Hayden
a40f93e046 🦸 RHEL 8.3: Switch to production CDN URL
Use the production CDN URL now that RHEL 8.3 beta content is available.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-30 07:58:08 -05:00
Major Hayden
17075cffa0 📦 mockbuild: Create 'latest' repo for branch
Allow anyone to set up a dnf repository to point to the latest
build for the branch by using a repo file pointing to that build.

This would allow anyone to get the latest set of RPMs for a particular
pull request or branch (especially the master branch.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-30 13:31:01 +02:00
Major Hayden
484bb9a182 🐣 Use RHEL 8.3 beta content from CDN
Remove the nightly repos from the RHEL 8.3 jobs and replace them with
CDN registration for beta content.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-29 13:25:29 -05:00
Major Hayden
61e6e5f500 Remove old testing YAML
Signed-off-by: Major Hayden <major@redhat.com>
2020-07-29 08:44:21 +02:00
Brian C. Lane
7ca9579487 client: Add an integration test for a bad blueprint depsolve
This test makes sure that a bad /blueprints/depsolve/... will return a
list of blueprints and a list of errors, not just a single error 400
response.
2020-07-28 08:18:56 +02:00
Brian C. Lane
eb76b9ec8e weldr: Fix the bad blueprint depsolve response
This changes the response to match lorax-composer's behavior. If any of
the blueprints in the list passed to /blueprints/depsolve/... have an
error that error should be appended to the error list, and the blueprint
included in the blueprints list with an empty dependencies section.

It was returning an error 400 and a single error if it hit any depsolve
problems, skipping any other blueprints and returning the wrong
response.

This also adjusts the tests to account for the change.

Fixes #890
2020-07-28 08:18:56 +02:00
Major Hayden
3d538a6663 Add Lorax TOML workaround
Copy the TOML workaround from the aws script to the qemu script.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-27 10:27:15 -05:00
Major Hayden
574c4f622c Update test cases
Signed-off-by: Major Hayden <major@redhat.com>
2020-07-27 10:27:15 -05:00
Major Hayden
3daa751095 distro/rhel8: increase default image size to 4GB
RHEL 8.3 requires more than 2GB to install on aarch64/ppc64le.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-27 10:27:15 -05:00
Major Hayden
f2d0f5e6f6 aarch64: Remove updates repo from test cases 2020-07-27 10:27:15 -05:00
Major Hayden
5ef678a57b aarch64: workaround qemu-convert CPU bug
The conversion with `qemu-img convert` often fails on aarch64 systems
with LOTS of CPUs. This is fixed in RHEL 8 for aarch64, but not in
Fedora.

Set the maximum coroutines to 1 to avoid this issue until the bug is
fixed.

Bug: https://bugs.launchpad.net/qemu/+bug/1805256

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-27 10:27:15 -05:00
Major Hayden
48fdc3d831 test case repos: use RHEL 8.3 Beta 1
Switch to RHEL 8.3 Beta 1 for generating test cases.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-27 10:27:15 -05:00