Skip to content

Vroom 18302

Nikolai Sednev requested to merge VROOM-18302 into main

Goal

As a QE, I want to have a smoke-test that detect if a bug related to the 'dnf variables' happens again and stop the pipeline from publishing a broken image.

Context

There has been times in the past when the OSTree images have failed due to an error. Here is an example if the error:

Command 'rpm-ostree install --apply-live --idempotent --allow-inactive ethtool glibc-headers' returned 1.
...

stderr (2 lines)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        notice: auto-inferring -y/--assumeyes when not run interactively; this will change in the future
        error: Updating rpm-md repo 'osbuild': cannot update repo 'osbuild': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Status code: 404 for https://download.copr.fedorainfracloud.org/results/@osbuild/osbuild/centos-stream-9-$arch/repodata/repomd.xml (IP: 108.138.85.54)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

The problem is that the rpm-ostree wasn't able to resolve the dnf variable $arch to the right architecture.

This error seems to be the same as the one we had some time ago: rpm-ostree does not read /etc/dnf/vars #3241

UPDATE: Actually, the current issue is not related to the dnf variables, but to to some OSBuild variable that is not being converted properly at building time. More details here: https://redhat-internal.slack.com/archives/C06794HLMLK/p1709752139864889

The test

We could create a test that detect original issue (if it happens again) by adding a repo that use the dnf variables (like 'baseach' or 'releasever') and run:

rpm-ostree refresh-md 

If the variables work, the command should work fine, if not it should throw an error similar to the one above.

Smoke test for OSBuild_variables.

This Test Suite includes these tests:

  1. Add regression test for rpm-ostree bug, related to the OSBuild variable that is not being converted properly at building time.
  2. The test adds a repo, that use the dnf variables (like $baseach or $releasever).
  3. Checks if the bug still exists by running "rpm-ostree refresh-md" command and reports if the original error:
"error: Updating rpm-md repo 'osbuild': cannot update repo 'osbuild': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Status code: 404" is detected on Ostree system.
Edited by Juanje Ojeda

Merge request reports