#9217 ipatests: wrong topology is used for rawhide/test_subids.py
Closed: fixed by frenaud. Opened by frenaud.

The nightly test test_integration/test_subids.py::TestSubordinateId is failing in rawhide, see PR #1929 with the following report:

self = <ipatests.pytest_ipa.integration.config.Config object at 0x7f8c51a06010>
descriptions = [{'hosts': {'client': 1, 'master': 1, 'replica': 0}, 'type': 'IPA'}]
    def filter(self, descriptions):
        """Destructively filters hosts and orders domains to fit description
        By default make_multihost_fixture() skips a test case, when filter()
        returns a FilterError. Let's turn FilterError into a fatal error
        instead.
        """
        try:
>           super(Config, self).filter(descriptions)
pytest_ipa/integration/config.py:118: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <ipatests.pytest_ipa.integration.config.Config object at 0x7f8c51a06010>
descriptions = [{'hosts': {'client': 1, 'master': 1, 'replica': 0}, 'type': 'IPA'}]
    def filter(self, descriptions):
        """Destructively filters hosts and orders domains to fit description
        :param descriptions:
            List of dicts such as:
                [
                    {
                        'type': 'ipa',
                        'hosts': {
                            'master': 1,
                            'replica': 2,
                        },
                    },
                ]
            i.e. the "type" is a type of domain, and "hosts" a dict mapping
            host roles to the number of hosts of this role that are required.
        """
        unique_domain_types = set(d.get('type', 'default')
                                  for d in descriptions)
        if len(descriptions) != len(unique_domain_types):
            # TODO: The greedy algorithm used to match domains may not yield
            # the correct result if there are several domains of the same type.
            raise ValueError('Duplicate domain type not supported')
        new_domains = []
        for i, description in enumerate(descriptions):
            for domain in list(self.domains):
                if domain.fits(description):
                    domain.filter(description['hosts'])
                    new_domains.append(domain)
                    self.domains.remove(domain)
                    break
            else:
>               raise FilterError(
                    'Domain %s not configured: %s' % (i, description))
E               pytest_multihost.config.FilterError: Domain 0 not configured: {'type': 'IPA', 'hosts': {'master': 1, 'replica': 0, 'client': 1}}

The error happens because the test definition is using a topology with 1 master and 1 replica: https://github.com/freeipa/freeipa/blob/42b2607a6f3809ba26368f415c04aefa31728137/ipatests/prci_definitions/nightly_rawhide.yaml#L1879-L1890
but the test needs 1 client:
https://github.com/freeipa/freeipa/blob/42b2607a6f3809ba26368f415c04aefa31728137/ipatests/test_integration/test_subids.py#L18
and the topo needs to be master_1repl_1client.


Metadata Update from @frenaud:
- Issue assigned to frenaud

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/6401

Same issue on the nightly def testing_master_sssd, see PR #1932.

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

master:

  • ccb012b4024d1e85f75d845178b73ee1a87f6422 ipatests: fix the topology for rawhide/test_subids

Metadata Update from @frenaud:
- Issue status updated to: Open (was: Closed)

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata