Bug 1220378 - [Build 3.57_base-fips-image] openQA test fails in bci_test_podman
Summary: [Build 3.57_base-fips-image] openQA test fails in bci_test_podman
Status: RESOLVED FIXED
Alias: None
Product: PUBLIC SUSE Linux Enterprise Server 15 SP3
Classification: SUSE Linux Enterprise Server
Component: Containers (show other bugs)
Version: unspecified
Hardware: x86-64 SLES 15
: P5 - None : Normal
Target Milestone: unspecified
Assignee: Danish Prakash
QA Contact: E-mail List
URL: https://openqa.suse.de/tests/13599318...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-26 17:29 UTC by Maurizio Dati
Modified: 2024-07-19 18:40 UTC (History)
2 users (show)

See Also:
Found By: openQA
Services Priority:
Business Priority:
Blocker: Yes
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maurizio Dati 2024-02-26 17:29:21 UTC
## Observation

openQA test in scenario sle-15-SP3-BCI-Updates-x86_64-bci-base-fips_15.3_on_SLES_15-SP3_podman@64bit fails in
[bci_test_podman](https://openqa.suse.de/tests/13599318/modules/bci_test_podman/steps/53)

Same error for docker too in test: https://openqa.suse.de/tests/13599317#step/bci_test_docker/63


## Test suite description
The base test suite is used for job templates defined in YAML documents. It has no settings of its own.


## Reproducible

Fails since (at least) Build [3.57_base-fips-image](https://openqa.suse.de/tests/13585805)


## Expected result

Last good: (unknown) (or more recent)


## Further details

Always latest result in this scenario: [latest](https://openqa.suse.de/tests/latest?arch=x86_64&distri=sle&flavor=BCI-Updates&machine=64bit&test=bci-base-fips_15.3_on_SLES_15-SP3_podman&version=15-SP3)

### Logs:

From Serial_terminal:
...
[gw1] [ 80%] FAILED tests/test_metadata.py::test_reference[container56-base-fips-bci] 
[gw0] [100%] RERUN tests/test_metadata.py::test_disturl[container56-base-fips-bci] 
tests/test_metadata.py::test_disturl[container56-base-fips-bci] 
[gw0] [100%] RERUN tests/test_metadata.py::test_disturl[container56-base-fips-bci] 
tests/test_metadata.py::test_disturl[container56-base-fips-bci] 
[gw0] [100%] RERUN tests/test_metadata.py::test_disturl[container56-base-fips-bci] 
tests/test_metadata.py::test_disturl[container56-base-fips-bci] 
[gw0] [100%] FAILED tests/test_metadata.py::test_disturl[container56-base-fips-bci] 

=================================== FAILURES ===================================
________________ test_general_labels[container56-base-fips-bci] ________________
[gw0] linux -- Python 3.6.15 /root/BCI-tests/.tox/metadata/bin/python

container = ContainerData(image_url_or_id='registry.suse.de/suse/sle-15-sp3/update/cr/totest/images/suse/ltss/sle15.3/bci-base-fip...nRuntime(build_command=['buildah', 'bud', '--layers', '--force-rm'], runner_binary='podman', _runtime_functional=True))
container_name = 'base-fips', container_type = <ImageType.OS_LTSS: 4>

    @pytest.mark.parametrize(
        "container,container_name,container_type",
        IMAGES_AND_NAMES_WITH_BASE_XFAIL,
        indirect=["container"],
    )
    def test_general_labels(
        container: ContainerData,
        container_name: str,
        container_type: ImageType,
    ):
        """Base check of the labels ``com.suse.bci.$name.$label`` (for language
        stack containers and OS containers) or ``com.suse.application.$name.$label``
        (for application stack containers) and ``org.opencontainers.image.$label``:
    
        - ensure that ``BCI`` is in ``$label=title``
        - check that ``based on the SLE Base Container Image`` is in
          ``$label=description``
        - ``$label=version`` is either ``latest`` or :py:const:`OS_VERSION`
        - ``$label=url`` equals :py:const:`URL`
        - ``$label=vendor`` equals :py:const:`VENDOR`
    
        """
    
        labels = container.inspect.config.labels
        version = container.container.get_base().url.split(":")[-1]
    
        for prefix in (
            _get_container_label_prefix(container_name, container_type),
            "org.opencontainers.image",
        ):
            if container_type not in (ImageType.APPLICATION, ImageType.OS_LTSS):
                assert "BCI" in labels[f"{prefix}.title"]
    
            if OS_VERSION == "tumbleweed":
                assert (
                    "based on the openSUSE Tumbleweed Base Container Image."
                    in labels[f"{prefix}.description"]
                )
            elif container_type == ImageType.OS_LTSS:
>               assert (
                    "based on SUSE Linux Enterprise Server 15"
                    in labels[f"{prefix}.description"]
                )
E               KeyError: 'com.suse.sle.base-fips.description'

tests/test_metadata.py:302: KeyError
---------------------------- Captured stderr setup -----------------------------
Trying to pull registry.suse.de/suse/sle-15-sp3/update/cr/totest/images/suse/ltss/sle15.3/bci-base-fips:15.3...
Getting image source signatures
Checking if image destination supports signatures
Copying blob sha256:3af484262edf01cf0d8bbf541a6d85795f79f1dffcd3fcbdc68dadffdcb1837b
Copying blob sha256:67e592d59ffe1b47aa2eddc186fa103b39552366c59fd4cecbd528e1ae9163cd
Copying config sha256:6f58f91434dcc67012f37430eeab68bd426974847f47b2357d8eb8b5e390296d
Writing manifest to image destination
Storing signatures
Trying to pull registry.suse.de/suse/sle-15-sp3/update/cr/totest/images/suse/ltss/sle15.3/bci-base-fips:15.3...
Getting image source signatures
Checking if image destination supports signatures
Copying blob sha256:3af484262edf01cf0d8bbf541a6d85795f79f1dffcd3fcbdc68dadffdcb1837b
Copying blob sha256:67e592d59ffe1b47aa2eddc186fa103b39552366c59fd4cecbd528e1ae9163cd
Copying config sha256:6f58f91434dcc67012f37430eeab68bd426974847f47b2357d8eb8b5e390296d
Writing manifest to image destination
Storing signatures
time="2024-02-25T11:54:59-05:00" level=warning msg="The input device is not a TTY. The --tty and --interactive flags might not work properly"
---

### Notes: 
https://suse.slack.com/archives/C02AF8LALDA/p1708934683421299
Comment 2 Felix Niederwanger 2024-03-11 13:05:03 UTC
The issue is still present on the 15-SP3 fips container, e.g. seen in https://openqa.suse.de/tests/overview?distri=sle&version=15-SP3&build=3.63_base-fips-image&groupid=442

In short: There are three labels wrong according to BCI-Tests in that container:

* KeyError: 'com.suse.sle.base-fips.description'
* KeyError: 'com.suse.sle.base-fips.reference'
* KeyError: 'com.suse.sle.base-fips.disturl'
Comment 4 Felix Niederwanger 2024-03-20 08:54:46 UTC
Build 4.2 of the base-fips container for 15-SP3 appears to be fixed: https://openqa.suse.de/tests/overview?distri=sle&version=15-SP3&build=4.2_base-fips-image&groupid=442

Marking as resolved.