[integration tests] Check dhcp-agents work test fails with AssertionError

Bug #1583582 reported by Georgy Dyuldin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Confirmed
High
MOS QA Team

Bug Description

Test result: https://mirantis.testrail.com/index.php?/tests/view/6073258

Exception:

AssertionError: Amounts of networks for each agent are not nearly equal. assert <bound method TestDHCPAgent.isclose of <mos_tests.neutron.python_tests.test_dhcp_agent.TestDHCPAgent object at 0x7f71edcfe490>>(30, 38, abs_tol=3) + where <bound method TestDHCPAgent.isclose of <mos_tests.neutron.python_tests.test_dhcp_agent.TestDHCPAgent object at 0x7f71edcfe490>> = <mos_tests.neutron.python_tests.test_dhcp_agent.TestDHCPAgent object at 0x7f71edcfe490>.isclose

Trace:

self = <mos_tests.neutron.python_tests.test_dhcp_agent.TestDHCPAgent object at 0x7f71edcfe490>

    @pytest.mark.testrail_id('542614')
    def test_to_check_dhcp_agents_work(self):
        """[Neutron VLAN and VXLAN] Check dhcp-agents work

            Steps:
                1. Update quotas for creation a lot of networks:
                    neutron quota-update --network 50 --subnet 50
                                         --router 50 --port 250:
                2. Create max count networks, subnets, launch and terminate
                    instance on each
                3. Get the table with all agents:
                    neutron agent-list
                4. Check networks on each dhcp-agent:
                    neutron net-list-on-dhcp-agent <id_agent_from_the_table>
                    Check that there are nets on all of agent
                5. Check networks quantity on each dhcp-agent:
                    neutron net-list-on-dhcp-agent <id_agent_from_the_table>
                  Check that quantity on agents are nearly equal
            """

        self.set_neutron_quota(network=50, router=50, subnet=50, port=250)
        self.networks = self.create_max_networks_with_instances(self.router)

        # Count networks for each dhcp agent
        # Each agent should contain networks
        # And amount of networks for each agent should be nearly equal
        networks_amount_on_each_agt = []
        for agt_id in self.dhcp_agent_ids:
            amount = len(self.os_conn.neutron.list_networks_on_dhcp_agent(
                         agt_id)['networks'])
            err_msg = "The dhcp agent {} has no networks!".format(agt_id)
            assert amount > 0, err_msg
            networks_amount_on_each_agt.append(amount)
            logger.info('the dhcp agent {0} has {1} networks'.
                        format(agt_id, amount))
        max_value = max(networks_amount_on_each_agt)
        networks_amount_on_each_agt.remove(max_value)
        err_msg = "Amounts of networks for each agent are not nearly equal."
        for value in networks_amount_on_each_agt:
> assert self.isclose(value, max_value, abs_tol=3), err_msg
E AssertionError: Amounts of networks for each agent are not nearly equal.
E assert <bound method TestDHCPAgent.isclose of <mos_tests.neutron.python_tests.test_dhcp_agent.TestDHCPAgent object at 0x7f71edcfe490>>(30, 38, abs_tol=3)
E + where <bound method TestDHCPAgent.isclose of <mos_tests.neutron.python_tests.test_dhcp_agent.TestDHCPAgent object at 0x7f71edcfe490>> = <mos_tests.neutron.python_tests.test_dhcp_agent.TestDHCPAgent object at 0x7f71edcfe490>.isclose

mos_tests/neutron/python_tests/test_dhcp_agent.py:100: AssertionError

Tags: area-qa
Changed in mos:
status: New → Confirmed
assignee: nobody → Georgy Dyuldin (g-dyuldin)
Dina Belova (dbelova)
Changed in mos:
importance: Undecided → High
milestone: none → 9.0
Changed in mos:
assignee: Georgy Dyuldin (g-dyuldin) → MOS QA Team (mos-qa)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.