Repository: osbuild/osbuild-composer
Pull request #2975 (2022-09-09 10:20:06)

CI: Introduce x86_64 rules
This pull request includes:

- [ ] adequate testing for the new functionality or fixed issue
- [ ] adequate documentation informing people about the change such as
  - [ ] submit a PR for the [guides](https://github.com/osbuild/guides) repository if this PR changed any behavior described there: https://www.osbuild.org/guides/

<!--
Thanks for proposing a change to osbuild-composer!

Please don't remove the above check list. These are things that each pull
request must have before it is merged. It helps maintainers to not forget
anything.

If the reason for ticking any of the boxes is ambiguous, please add a short
note explaining why.

In addition, if this pull request fixes a downstream issue, please refer to
test/README.md and add these additional items:

- [ ] 1st commit of any `rhbz#` related PR contains bug reproducer; CI reports FAIL or
- [ ] PR contains automated tests for new functionality and
- [ ] QE has approved reproducer/new tests and
- [ ] Subsequent commits provide bug fixes without modifying the reproducer; CI reports PASS and
- [ ] QE approves this PR; RHBZ status is set to `MODIFIED + Verified=Tested`

Information regarding our GitLab pipeline (Schutzbot):

CI will not be ran automatically if WIP label is applied or the PR is in DRAFT state, instead only
a link will be provided to the pipeline which can then be triggered manually if desired. To run the
CI automatically either switch the PR to ready or apply WIP+test label.

Outside contributors need manual approval from one of the osbuild-composer maintainers.

Schutzbot will only be triggered if all Tests jobs in GitHub workflow succeed.
-->


jrusz: Upgrade test passed here with the new fix https://gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/-/jobs/3004161492

CI run with 8.7 nightly: https://gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/-/pipelines/635602367

Patch:
diff --git a/.gitignore b/.gitignore
index a72a0ca51..2d313d277 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@ __pycache__
 
 .vscode
 .DS_Store
+/.idea
 
 /containers/config/
 /bin
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4fdefe3a8..41502c519 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -51,15 +51,24 @@ init:
     - if: '$CI_PIPELINE_SOURCE != "schedule" && $SKIP_CI == "true"'
       when: manual
 
-.upstream_rules:
+.upstream_rules_all:
   rules:
     - if: '$CI_PIPELINE_SOURCE != "schedule"'
 
-.nightly_rules:
+.upstream_rules_x86_64:
+  rules:
+    - if: '$CI_PIPELINE_SOURCE != "schedule" && $RUNNER =~ "/^.*(x86_64).*$/"'
+
+.nightly_rules_all:
   rules:
     - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-9.1-[^ga][\S]+/ && $NIGHTLY == "true" && $RHEL_MAJOR == "9"'
     - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-8.7-[^ga][\S]+/ && $NIGHTLY == "true" && $RHEL_MAJOR == "8"'
 
+.nightly_rules_x86_64:
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-9.1-[^ga][\S]+/ && $RUNNER =~ "/^.*(x86_64).*$/" && $NIGHTLY == "true" && $RHEL_MAJOR == "9"'
+    - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-8.7-[^ga][\S]+/ && $RUNNER =~ "/^.*(x86_64).*$/" && $NIGHTLY == "true" && $RHEL_MAJOR == "8"'
+
 
 .RPM_RUNNERS_RHEL: &RPM_RUNNERS_RHEL
   RUNNER:
@@ -100,7 +109,7 @@ Build -tests RPM for RHEL:
   stage: rpmbuild
   extends: .terraform
   rules:
-    - !reference [.nightly_rules, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - sh "schutzbot/mockbuild.sh"
   interruptible: true
@@ -137,7 +146,7 @@ Prepare-rhel-internal:
   stage: prepare-rhel-internal
   extends: .terraform
   rules:
-    - !reference [.nightly_rules, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - schutzbot/prepare-rhel-internal.sh
   artifacts:
@@ -158,8 +167,8 @@ Base:
   stage: test
   extends: .terraform
   rules:
-    - !reference [.upstream_rules, rules]
-    - !reference [.nightly_rules, rules]
+    - !reference [.upstream_rules_all, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/base_tests.sh
@@ -191,8 +200,8 @@ Manifests:
   stage: test
   extends: .terraform
   rules:
-    - !reference [.upstream_rules, rules]
-    - !reference [.nightly_rules, rules]
+    - !reference [.upstream_rules_all, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/manifest_tests.sh
@@ -206,8 +215,8 @@ Manifests:
   stage: test
   extends: .terraform
   rules:
-    - !reference [.upstream_rules, rules]
-    - !reference [.nightly_rules, rules]
+    - !reference [.upstream_rules_all, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/${SCRIPT}
@@ -248,7 +257,7 @@ regression-composer-works-behind-satellite-fallback:
   rules: 
     # BLACKLIST: Skipped on subscribed RHEL machines
     - if: $RUNNER !~ "/^.*(rhel-.*-ga|centos).*$/" && $CI_PIPELINE_SOURCE != "schedule"
-    - !reference [.nightly_rules, rules]
+    - !reference [.nightly_rules_all, rules]
   variables:
     SCRIPT: regression-composer-works-behind-satellite-fallback.sh
 
@@ -257,7 +266,7 @@ regression-composer-works-behind-satellite:
   rules: 
     # BLACKLIST: Skipped on subscribed RHEL machines
     - if: $RUNNER !~ "/^.*(rhel-.*-ga|centos).*$/" && $CI_PIPELINE_SOURCE != "schedule"
-    - !reference [.nightly_rules, rules]
+    - !reference [.nightly_rules_all, rules]
   variables:
     SCRIPT: regression-composer-works-behind-satellite.sh
 
@@ -266,7 +275,7 @@ regression-excluded-dependency:
   rules: 
     # WHITELIST
     - if: $RUNNER =~ "/^.*(rhel-8.6|rhel-9.0|centos-stream-8|centos-stream-9).*$/" && $CI_PIPELINE_SOURCE != "schedule"
-    - !reference [.nightly_rules, rules]
+    - !reference [.nightly_rules_all, rules]
   variables:
     SCRIPT: regression-excluded-dependency.sh
 
@@ -275,7 +284,7 @@ regression-include-excluded-packages:
   rules: 
     # BLACKLIST: Skipped on fedora systems
     - if: $RUNNER !~ "/^.*(fedora).*$/" && $CI_PIPELINE_SOURCE != "schedule"
-    - !reference [.nightly_rules, rules]
+    - !reference [.nightly_rules_all, rules]
   variables:
     SCRIPT: regression-include-excluded-packages.sh
 
@@ -306,7 +315,7 @@ regression-no-explicit-rootfs-definition:
   rules: 
     # BLACKLIST: Skipped on fedora systems
     - if: $RUNNER !~ "/^.*(fedora).*$/" && $CI_PIPELINE_SOURCE != "schedule"
-    - !reference [.nightly_rules, rules]
+    - !reference [.nightly_rules_all, rules]
   variables:
     SCRIPT: regression-no-explicit-rootfs-definition.sh
 
@@ -314,7 +323,7 @@ Image Tests:
   stage: test
   extends: .terraform
   rules:
-    - !reference [.nightly_rules, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/image_tests.sh
@@ -333,7 +342,7 @@ OSTree:
   stage: test
   extends: .terraform/openstack
   rules:
-    - !reference [.upstream_rules, rules]
+    - !reference [.upstream_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/ostree.sh
@@ -387,8 +396,8 @@ OSTree raw image:
     # run only this edge test on nightly to have some testing for sign-off
     # but still reduce duplication with virt-qe Jenkins and increase nightly
     # pipelines stability
-    - !reference [.upstream_rules, rules]
-    - !reference [.nightly_rules, rules]
+    - !reference [.upstream_rules_all, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/ostree-raw-image.sh
@@ -432,8 +441,8 @@ Rebase OSTree UEFI:
   stage: test
   extends: .terraform
   rules:
-    - !reference [.upstream_rules, rules]
-    - !reference [.nightly_rules, rules]
+    - !reference [.upstream_rules_all, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/${SCRIPT}
@@ -479,7 +488,7 @@ koji.sh (cloud upload):
   stage: test
   extends: .terraform
   rules:
-    - !reference [.upstream_rules, rules]
+    - !reference [.upstream_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/koji.sh cloud-upload ${CLOUD_TARGET} ${IMAGE_TYPE}
@@ -508,7 +517,7 @@ koji.sh (cloudapi):
   extends: .integration
   # Not supported in nightly pipelines
   rules:
-    - !reference [.upstream_rules, rules]
+    - !reference [.upstream_rules_all, rules]
   variables:
     SCRIPT: koji.sh
 
@@ -519,27 +528,28 @@ aws.sh:
 
 azure.sh:
   extends: .integration
+  rules:
+    # Run only on x86_64
+    - !reference [.upstream_rules_x86_64, rules]
+    - !reference [.nightly_rules_x86_64, rules]
   variables:
     SCRIPT: azure.sh
-  rules:
-    - if: '$RUNNER =~ /[\S]+x86_64[\S]+/'
 
 # The required GCE image type is not supported on Fedora
 gcp.sh:
   extends: .integration_rhel
   rules: 
-    # BLACKLIST
-    - if: $RUNNER !~ "/^.*(rhel-8.7|rhel-9.1).*$/" && $CI_PIPELINE_SOURCE != "schedule" && $NIGHTLY != "true"
-    - !reference [.nightly_rules, rules]
+    - !reference [.upstream_rules_x86_64, rules]
+    - !reference [.nightly_rules_x86_64, rules]
   variables:
     SCRIPT: gcp.sh
 
 vmware.sh:
-  extends: .integration
+  extends: .integration_rhel
   rules:
-    # WHITELIST
-    - if: $RUNNER =~ "/^.*(rhel).*$/" && $RUNNER =~ "/^.*(x86_64).*$/" && $CI_PIPELINE_SOURCE != "schedule"
-    - !reference [.nightly_rules, rules]
+    # Run only on x86_64
+    - !reference [.upstream_rules_x86_64, rules]
+    - !reference [.nightly_rules_x86_64, rules]
   variables:
     SCRIPT: vmware.sh
 
@@ -567,7 +577,7 @@ API:
   stage: test
   extends: .terraform
   rules:
-    - !reference [.upstream_rules, rules]
+    - !reference [.upstream_rules_all, rules]
     # note: cloud API is not supported for on-prem installations so
     # don't run this test case for nightly trees
   script:
@@ -596,8 +606,8 @@ API:
   stage: test
   extends: .terraform/openstack
   rules:
-    - !reference [.upstream_rules, rules]
-    - !reference [.nightly_rules, rules]
+    - !reference [.upstream_rules_all, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/${SCRIPT}
@@ -621,7 +631,7 @@ libvirt.sh:
   rules:
     # BLACKLIST
     - if: $RUNNER !~ "/^.*(rhel-8.7|rhel-9.1).*$/" && $CI_PIPELINE_SOURCE != "schedule" && $NIGHTLY != "true"
-    - !reference [.nightly_rules, rules]
+    - !reference [.nightly_rules_all, rules]
 
 generic_s3_http.sh:
   extends: .generic_s3
@@ -647,7 +657,7 @@ RHEL 9 on 8:
   stage: test
   extends: .terraform
   rules:
-    - !reference [.upstream_rules, rules]
+    - !reference [.upstream_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/koji.sh
@@ -673,7 +683,7 @@ OpenSCAP:
   stage: test
   extends: .terraform
   rules:
-    - !reference [.upstream_rules, rules]
+    - !reference [.upstream_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/oscap.sh
@@ -687,7 +697,7 @@ Upgrade:
   stage: test
   extends: .terraform/openstack
   rules:
-    - !reference [.nightly_rules, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/upgrade8to9.sh
@@ -717,8 +727,8 @@ Installer:
   stage: test
   extends: .terraform/openstack
   rules:
-    - !reference [.upstream_rules, rules]
-    - !reference [.nightly_rules, rules]
+    - !reference [.upstream_rules_all, rules]
+    - !reference [.nightly_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/installers.sh
@@ -776,7 +786,7 @@ ContainerUpload:
   stage: test
   extends: .terraform
   rules:
-    - !reference [.upstream_rules, rules]
+    - !reference [.upstream_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/container-upload.sh
@@ -788,7 +798,7 @@ ContainerEmbedding:
   stage: test
   extends: .terraform
   rules:
-    - !reference [.upstream_rules, rules]
+    - !reference [.upstream_rules_all, rules]
   script:
     - schutzbot/deploy.sh
     - /usr/libexec/tests/osbuild-composer/container-embedding.sh
diff --git a/Schutzfile b/Schutzfile
index 581061e34..4d99379fa 100644
--- a/Schutzfile
+++ b/Schutzfile
@@ -46,14 +46,14 @@
           {
             "title": "updates",
             "name": "updates",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f35/f35-x86_64-updates-released-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f35/f35-x86_64-updates-released-20220906"
           }
         ],
         "aarch64": [
           {
             "title": "updates",
             "name": "updates",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f35/f35-aarch64-updates-released-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f35/f35-aarch64-updates-released-20220906"
           }
         ]
       },
@@ -63,14 +63,14 @@
           {
             "title": "updates-modular",
             "name": "updates-modular",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f35/f35-x86_64-updates-released-modular-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f35/f35-x86_64-updates-released-modular-20220906"
           }
         ],
         "aarch64": [
           {
             "title": "updates-modular",
             "name": "updates-modular",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f35/f35-aarch64-updates-released-modular-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f35/f35-aarch64-updates-released-modular-20220906"
           }
         ]
       }
@@ -123,14 +123,14 @@
           {
             "title": "updates",
             "name": "updates",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f36/f36-x86_64-updates-released-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f36/f36-x86_64-updates-released-20220906"
           }
         ],
         "aarch64": [
           {
             "title": "updates",
             "name": "updates",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f36/f36-aarch64-updates-released-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f36/f36-aarch64-updates-released-20220906"
           }
         ]
       },
@@ -140,14 +140,14 @@
           {
             "title": "updates-modular",
             "name": "updates-modular",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f36/f36-x86_64-updates-released-modular-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f36/f36-x86_64-updates-released-modular-20220906"
           }
         ],
         "aarch64": [
           {
             "title": "updates-modular",
             "name": "updates-modular",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f36/f36-aarch64-updates-released-modular-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f36/f36-aarch64-updates-released-modular-20220906"
           }
         ]
       }
@@ -180,34 +180,34 @@
           {
             "title": "RHEL-8-RPMREPO-NIGHTLY-BaseOS",
             "name": "baseos",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-baseos-n8.7-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-baseos-n8.7-20220906"
           },
           {
             "title": "RHEL-8-RPMREPO-NIGHTLY-AppStream",
             "name": "appstream",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-appstream-n8.7-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-appstream-n8.7-20220906"
           },
           {
             "title": "RHEL-8-RPMREPO-NIGHTLY-CRB",
             "name": "crb",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-crb-n8.7-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-crb-n8.7-20220906"
           }
         ],
         "aarch64": [
           {
             "title": "RHEL-8-RPMREPO-NIGHTLY-BaseOS",
             "name": "baseos",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-aarch64-baseos-n8.7-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-aarch64-baseos-n8.7-20220906"
           },
           {
             "title": "RHEL-8-RPMREPO-NIGHTLY-AppStream",
             "name": "appstream",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-aarch64-appstream-n8.7-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-aarch64-appstream-n8.7-20220906"
           },
           {
             "title": "RHEL-8-RPMREPO-NIGHTLY-CRB",
             "name": "crb",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-aarch64-crb-n8.7-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-aarch64-crb-n8.7-20220906"
           }
         ]
       }
@@ -233,34 +233,34 @@
           {
             "title": "RHEL-9-RPMREPO-NIGHTLY-BaseOS",
             "name": "baseos",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-x86_64-baseos-n9.1-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-x86_64-baseos-n9.1-20220906"
           },
           {
             "title": "RHEL-9-RPMREPO-NIGHTLY-AppStream",
             "name": "appstream",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-x86_64-appstream-n9.1-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-x86_64-appstream-n9.1-20220906"
           },
           {
             "title": "RHEL-9-RPMREPO-NIGHTLY-CRB",
             "name": "crb",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-x86_64-crb-n9.1-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-x86_64-crb-n9.1-20220906"
           }
         ],
         "aarch64": [
           {
             "title": "RHEL-9-RPMREPO-NIGHTLY-BaseOS",
             "name": "baseos",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-aarch64-baseos-n9.1-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-aarch64-baseos-n9.1-20220906"
           },
           {
             "title": "RHEL-9-RPMREPO-NIGHTLY-AppStream",
             "name": "appstream",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-aarch64-appstream-n9.1-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-aarch64-appstream-n9.1-20220906"
           },
           {
             "title": "RHEL-9-RPMREPO-NIGHTLY-CRB",
             "name": "crb",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-aarch64-crb-n9.1-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-aarch64-crb-n9.1-20220906"
           }
         ]
       }
@@ -339,14 +339,14 @@
           {
             "title": "baseos",
             "name": "baseos",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-x86_64-baseos-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-x86_64-baseos-20220906"
           }
         ],
         "aarch64": [
           {
             "title": "baseos",
             "name": "baseos",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-aarch64-baseos-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-aarch64-baseos-20220906"
           }
         ]
       },
@@ -356,14 +356,14 @@
           {
             "title": "appstream",
             "name": "appstream",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-x86_64-appstream-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-x86_64-appstream-20220906"
           }
         ],
         "aarch64": [
           {
             "title": "appstream",
             "name": "appstream",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-aarch64-appstream-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-aarch64-appstream-20220906"
           }
         ]
       },
@@ -373,14 +373,14 @@
           {
             "title": "powertools",
             "name": "powertools",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-x86_64-powertools-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-x86_64-powertools-20220906"
           }
         ],
         "aarch64": [
           {
             "title": "powertools",
             "name": "powertoosl",
-            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-aarch64-powertools-20220715"
+            "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/el8/cs8-aarch64-powertools-20220906"
           }
         ]
       }
diff --git a/internal/common/slogger/logrus.go b/internal/common/slogger/logrus.go
new file mode 100644
index 000000000..dd99d8abb
--- /dev/null
+++ b/internal/common/slogger/logrus.go
@@ -0,0 +1,38 @@
+package slogger
+
+import (
+	"github.com/osbuild/osbuild-composer/pkg/jobqueue"
+	"github.com/sirupsen/logrus"
+)
+
+type simpleLogrus struct {
+	logger *logrus.Logger
+}
+
+func NewLogrusLogger(logger *logrus.Logger) jobqueue.SimpleLogger {
+	return &simpleLogrus{logger: logger}
+}
+
+func (s *simpleLogrus) log(level logrus.Level, err error, msg string, args ...string) {
+	if len(args)%2 != 0 {
+		panic("log arguments must be even (key value pairs)")
+	}
+	var fields = make(logrus.Fields, len(args)/2+1)
+	for i := 0; i < len(args); i += 2 {
+		k := args[i]
+		v := args[i+1]
+		fields[k] = v
+	}
+	if err != nil {
+		fields["error"] = err.Error()
+	}
+	s.logger.WithFields(fields).Log(level, msg)
+}
+
+func (s *simpleLogrus) Info(msg string, args ...string) {
+	s.log(logrus.InfoLevel, nil, msg, args...)
+}
+
+func (s *simpleLogrus) Error(err error, msg string, args ...string) {
+	s.log(logrus.ErrorLevel, err, msg, args...)
+}
diff --git a/internal/common/slogger/noop.go b/internal/common/slogger/noop.go
new file mode 100644
index 000000000..8782315b8
--- /dev/null
+++ b/internal/common/slogger/noop.go
@@ -0,0 +1,18 @@
+package slogger
+
+import (
+	"github.com/osbuild/osbuild-composer/pkg/jobqueue"
+)
+
+type noopLogger struct {
+}
+
+func NewNoopLogger() jobqueue.SimpleLogger {
+	return &noopLogger{}
+}
+
+func (s *noopLogger) Info(_ string, _ ...string) {
+}
+
+func (s *noopLogger) Error(_ error, _ string, _ ...string) {
+}
diff --git a/pkg/jobqueue/dbjobqueue/dbjobqueue.go b/pkg/jobqueue/dbjobqueue/dbjobqueue.go
index 02dfc5c49..970c41a4c 100644
--- a/pkg/jobqueue/dbjobqueue/dbjobqueue.go
+++ b/pkg/jobqueue/dbjobqueue/dbjobqueue.go
@@ -18,10 +18,9 @@ import (
 	"github.com/jackc/pgtype"
 	"github.com/jackc/pgx/v4"
 	"github.com/jackc/pgx/v4/pgxpool"
-
+	"github.com/osbuild/osbuild-composer/internal/common/slogger"
 	"github.com/osbuild/osbuild-composer/pkg/jobqueue"
-
-	logrus "github.com/sirupsen/logrus"
+	"github.com/sirupsen/logrus"
 )
 
 const (
@@ -106,6 +105,7 @@ const (
 )
 
 type DBJobQueue struct {
+	logger       jobqueue.SimpleLogger
 	pool         *pgxpool.Pool
 	dequeuers    *dequeuers
 	stopListener func()
@@ -153,8 +153,24 @@ func (d *dequeuers) notifyAll() {
 	}
 }
 
-// Create a new DBJobQueue object for `url`.
+// Config allows more detailed customization of queue behavior
+type Config struct {
+	// Logger is used for all logging of the queue, when not provided, the stanard
+	// global logger (logrus) is used.
+	Logger jobqueue.SimpleLogger
+}
+
+// New creates a new DBJobQueue object for `url` with default configuration.
 func New(url string) (*DBJobQueue, error) {
+	stdLogger := slogger.NewLogrusLogger(logrus.StandardLogger())
+	config := Config{
+		Logger: stdLogger,
+	}
+	return NewWithConfig(url, config)
+}
+
+// NewWithLogger creates a new DBJobQueue object for `url` with specific configuration.
+func NewWithConfig(url string, config Config) (*DBJobQueue, error) {
 	pool, err := pgxpool.Connect(context.Background(), url)
 	if err != nil {
 		return nil, fmt.Errorf("error establishing connection: %v", err)
@@ -162,6 +178,7 @@ func New(url string) (*DBJobQueue, error) {
 
 	listenContext, cancel := context.WithCancel(context.Background())
 	q := &DBJobQueue{
+		logger:       config.Logger,
 		pool:         pool,
 		dequeuers:    newDequeuers(),
 		stopListener: cancel,
@@ -185,7 +202,7 @@ func (q *DBJobQueue) listen(ctx context.Context, ready chan<- struct{}) {
 		// use the empty context as the listening context is already cancelled at this point
 		_, err := conn.Exec(context.Background(), sqlUnlisten)
 		if err != nil && !errors.Is(err, context.DeadlineExceeded) {
-			logrus.Error("Error unlistening for jobs in dequeue: ", err)
+			q.logger.Error(err, "Error unlistening for jobs in dequeue")
 		}
 		conn.Release()
 	}()
@@ -202,13 +219,13 @@ func (q *DBJobQueue) listen(ctx context.Context, ready chan<- struct{}) {
 		if err != nil {
 			// shutdown the listener if the context is canceled
 			if errors.Is(err, context.Canceled) {
-				logrus.Info("Shutting down the listener")
+				q.logger.Info("Shutting down the listener")
 				return
 			}
 
 			// otherwise, just log the error and continue, there might just
 			// be a temporary networking issue
-			logrus.Debugf("error waiting for notification on jobs channel: %v", err)
+			q.logger.Error(err, "Error waiting for notification on jobs channel")
 			continue
 		}
 
@@ -236,7 +253,7 @@ func (q *DBJobQueue) Enqueue(jobType string, args interface{}, dependencies []uu
 	defer func() {
 		err := tx.Rollback(context.Background())
 		if err != nil && !errors.Is(err, pgx.ErrTxClosed) {
-			logrus.Error("error rolling back enqueue transaction: ", err)
+			q.logger.Error(err, "Error rolling back enqueue transaction")
 		}
 	}()
 
@@ -263,7 +280,7 @@ func (q *DBJobQueue) Enqueue(jobType string, args interface{}, dependencies []uu
 		return uuid.Nil, fmt.Errorf("unable to commit database transaction: %v", err)
 	}
 
-	logrus.Infof("Enqueued job of type %s with ID %s(dependencies %v)", jobType, id, dependencies)
+	q.logger.Info("Enqueued job", "job_type", jobType, "job_id", id.String(), "job_dependencies", fmt.Sprintf("%+v", dependencies))
 
 	return id, nil
 }
@@ -318,7 +335,7 @@ func (q *DBJobQueue) Dequeue(ctx context.Context, jobTypes []string, channels []
 		return uuid.Nil, uuid.Nil, nil, "", nil, fmt.Errorf("error querying the job's dependencies: %v", err)
 	}
 
-	logrus.Infof("Dequeued job of type %v with ID %s", jobType, id)
+	q.logger.Info("Dequeued job", "job_type", jobType, "job_id", id.String(), "job_dependencies", fmt.Sprintf("%+v", dependencies))
 
 	return id, token, dependencies, jobType, args, nil
 }
@@ -372,7 +389,7 @@ func (q *DBJobQueue) DequeueByID(ctx context.Context, id uuid.UUID) (uuid.UUID,
 		return uuid.Nil, nil, "", nil, fmt.Errorf("error querying the job's dependencies: %v", err)
 	}
 
-	logrus.Infof("Dequeued job of type %v with ID %s", jobType, id)
+	q.logger.Info("Dequeued job", "job_type", jobType, "job_id", id.String(), "job_dependencies", fmt.Sprintf("%+v", dependencies))
 
 	return token, dependencies, jobType, args, nil
 }
@@ -391,7 +408,7 @@ func (q *DBJobQueue) FinishJob(id uuid.UUID, result interface{}) error {
 	defer func() {
 		err = tx.Rollback(context.Background())
 		if err != nil && !errors.Is(err, pgx.ErrTxClosed) {
-			logrus.Errorf("error rolling back finish job transaction for job %s: %v", id, err)
+			q.logger.Error(err, "Error rolling back finish job transaction", "job_id", id.String())
 		}
 
 	}()
@@ -440,7 +457,7 @@ func (q *DBJobQueue) FinishJob(id uuid.UUID, result interface{}) error {
 		return fmt.Errorf("unable to commit database transaction: %v", err)
 	}
 
-	logrus.Infof("Finished job with ID %s", id)
+	q.logger.Info("Finished job", "job_type", jobType, "job_id", id.String())
 
 	return nil
 }
@@ -462,7 +479,7 @@ func (q *DBJobQueue) CancelJob(id uuid.UUID) error {
 		return fmt.Errorf("error canceling job %s: %v", id, err)
 	}
 
-	logrus.Infof("Cancelled job with ID %s", id)
+	q.logger.Info("Cancelled job", "job_type", jobType, "job_id", id.String())
 
 	return nil
 }
@@ -560,13 +577,13 @@ func (q *DBJobQueue) Heartbeats(olderThan time.Duration) (tokens []uuid.UUID) {
 		err = rows.Scan(&t)
 		if err != nil {
 			// Log the error and try to continue with the next row
-			logrus.Error("Unable to read token from heartbeats: ", err)
+			q.logger.Error(err, "Unable to read token from heartbeats")
 			continue
 		}
 		tokens = append(tokens, t)
 	}
 	if rows.Err() != nil {
-		logrus.Error("Error reading tokens from heartbeats: ", rows.Err())
+		q.logger.Error(rows.Err(), "Error reading tokens from heartbeats")
 	}
 
 	return
@@ -582,10 +599,10 @@ func (q *DBJobQueue) RefreshHeartbeat(token uuid.UUID) {
 
 	tag, err := conn.Exec(context.Background(), sqlRefreshHeartbeat, token)
 	if err != nil {
-		logrus.Error("Error refreshing heartbeat: ", err)
+		q.logger.Error(err, "Error refreshing heartbeat")
 	}
 	if tag.RowsAffected() != 1 {
-		logrus.Error("No rows affected when refreshing heartbeat for ", token)
+		q.logger.Error(nil, "No rows affected when refreshing heartbeat", "job_token", token.String())
 	}
 }
 
diff --git a/pkg/jobqueue/jobqueue.go b/pkg/jobqueue/jobqueue.go
index ae8fad879..3d5bd8dd0 100644
--- a/pkg/jobqueue/jobqueue.go
+++ b/pkg/jobqueue/jobqueue.go
@@ -79,6 +79,18 @@ type JobQueue interface {
 	RefreshHeartbeat(token uuid.UUID)
 }
 
+// SimpleLogger provides a structured logging methods for the jobqueue library.
+type SimpleLogger interface {
+	// Info creates an info-level message and arbitrary amount of key-value string pairs which
+	// can be optionally mapped to fields by underlying implementations.
+	Info(msg string, args ...string)
+
+	// Error creates an error-level message and arbitrary amount of key-value string pairs which
+	// can be optionally mapped to fields by underlying implementations. The first error argument
+	// can be set to nil when no context error is available.
+	Error(err error, msg string, args ...string)
+}
+
 var (
 	ErrNotExist       = errors.New("job does not exist")
 	ErrNotPending     = errors.New("job is not pending")


Test patch:
diff --git a/internal/common/slogger/logrus_test.go b/internal/common/slogger/logrus_test.go
new file mode 100644
index 000000000..2e626eeec
--- /dev/null
+++ b/internal/common/slogger/logrus_test.go
@@ -0,0 +1,63 @@
+package slogger
+
+import (
+	"bytes"
+	"errors"
+	"testing"
+
+	"github.com/sirupsen/logrus"
+	"github.com/stretchr/testify/require"
+)
+
+func makeLogrus(buf *bytes.Buffer) *logrus.Logger {
+	return &logrus.Logger{
+		Out: buf,
+		Formatter: &logrus.TextFormatter{
+			DisableTimestamp: true,
+			DisableColors:    true,
+		},
+		Hooks: make(logrus.LevelHooks),
+		Level: logrus.DebugLevel,
+	}
+
+}
+
+func TestInfo(t *testing.T) {
+	buf := &bytes.Buffer{}
+	l := makeLogrus(buf)
+	sl := NewLogrusLogger(l)
+	sl.Info("test")
+	require.Equal(t, "level=info msg=test\n", buf.String())
+}
+
+func TestError(t *testing.T) {
+	buf := &bytes.Buffer{}
+	l := makeLogrus(buf)
+	sl := NewLogrusLogger(l)
+	sl.Error(errors.New("e"), "test")
+	require.Equal(t, "level=error msg=test error=e\n", buf.String())
+}
+
+func TestErrorIsNil(t *testing.T) {
+	buf := &bytes.Buffer{}
+	l := makeLogrus(buf)
+	sl := NewLogrusLogger(l)
+	sl.Error(nil, "test")
+	require.Equal(t, "level=error msg=test\n", buf.String())
+}
+
+func TestInfoWithFields(t *testing.T) {
+	buf := &bytes.Buffer{}
+	l := makeLogrus(buf)
+	sl := NewLogrusLogger(l)
+	sl.Info("test", "key", "value")
+	require.Equal(t, "level=info msg=test key=value\n", buf.String())
+}
+
+func TestErrorWithFields(t *testing.T) {
+	buf := &bytes.Buffer{}
+	l := makeLogrus(buf)
+	sl := NewLogrusLogger(l)
+	sl.Error(errors.New("e"), "test", "key", "value")
+	require.Equal(t, "level=error msg=test error=e key=value\n", buf.String())
+}
diff --git a/test/data/upgrade8to9/upgrade_prepare.sh b/test/data/upgrade8to9/upgrade_prepare.sh
index b628357dd..b3659e729 100755
--- a/test/data/upgrade8to9/upgrade_prepare.sh
+++ b/test/data/upgrade8to9/upgrade_prepare.sh
@@ -12,7 +12,7 @@ dnf install -y osbuild-composer composer-cli
 
 # Prepare the upgrade
 curl -k -o /etc/yum.repos.d/oam-group-leapp-rhel-8.repo https://gitlab.cee.redhat.com/leapp/oamg-rhel8-vagrant/-/raw/master/roles/init/files/leapp-copr.repo
-dnf install leapp-upgrade-el8toel9 -y
+dnf install -y leapp-upgrade-el8toel9 vdo
 curl -kLO https://gitlab.cee.redhat.com/leapp/oamg-rhel7-vagrant/raw/master/roles/init/files/prepare_test_env.sh
 source /root/prepare_test_env.sh
 get_data_files