[integration tests] Bandwidth is too low Exception on QoS tests

Bug #1584634 reported by Georgy Dyuldin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Georgy Dyuldin

Bug Description

Test result:

https://mirantis.testrail.com/index.php?/tests/view/6206415

Exception:

Bandwidth is too low: 3512729, limit is 4403200

Trace:

self = <mos_tests.neutron.python_tests.test_qos.TestTraficBetweenComputes object at 0x7fe4ca234cd0>
instances = [<Server: server00>, <Server: server01>]
os_conn = <mos_tests.environment.os_actions.OpenStackActions object at 0x7fe4ca234b10>
clean_port_policy = None, clean_net_policy = None

    @pytest.mark.testrail_id('838310')
    def test_restrictions_on_net_and_vm(self, instances, os_conn,
                                        clean_port_policy, clean_net_policy):
        """Check traffic restriction between vms if there are different
            restrictions in the net and vm

            Scenario:
                1. Create net01, subnet
                2. Create router01, set gateway and add interface to net01
                3. Create new policy: neutron qos-policy-create policy_1
                4. Create new rule:
                    neutron qos-bandwidth-limit-rule-create rule-id policy_1 \
                    --max-kbps 4000 --max-burst-kbps 300
                5. Update net01 with --qos-policy parameter
                6. Boot ubuntu vm1 in net01 on compute-1
                7. Boot ubuntu vm2 in net01 on compute-2
                8. Start iperf between vm1 and vm2
                9. Look on the traffic with nload on vm port on compute-1
                10. Create new policy: neutron qos-policy-create bw-limiter
                11. Create new rule:
                    neutron qos-bandwidth-limit-rule-create rule-id bw-limiter \
                    --max-kbps 3000
                12. Find neutron port for vm1: neutron port-list | grep <vm1 ip>
                13. Update port with new policy:
                    neutron port-update your-port-id --qos-policy bw-limiter
                14. Check in nload that traffic changed properly
                15. Update rule for vm port:
                    neutron qos-bandwidth-limit-rule-update rule-id bw-limiter \
                    --max-kbps 6000
            """
        instance1, instance2 = instances

        # Create policy for net
        policy1 = os_conn.create_qos_policy('policy_1')
        os_conn.neutron.create_bandwidth_limit_rule(policy1['policy']['id'], {
            'bandwidth_limit_rule': {
                'max_kbps': 4000,
                'max_burst_kbps': 300,
            }
        })
        os_conn.neutron.update_network(
            self.net['network']['id'],
            {'network': {'qos_policy_id': policy1['policy']['id']}})

> self.check_iperf_bandwidth(instance1, instance2, (4000 + 300) * 1024)

mos_tests/neutron/python_tests/test_qos.py:438:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <mos_tests.neutron.python_tests.test_qos.TestTraficBetweenComputes object at 0x7fe4ca234cd0>
client = <Server: server00>, server = <Server: server01>, limit = 4403200
ip_type = 'fixed', kwargs = {}, server_ip = '10.0.0.5'
remote = <mos_tests.environment.ssh.SSHClient object at 0x7fe4ca4ac5d0> [10.0.0.4:22]
line = ['20160523050738', '10.0.0.4', '40828', '10.0.0.5', '5002', '3', ...]
bandwidth = 3512729

    def check_iperf_bandwidth(self,
                              client,
                              server,
                              limit,
                              ip_type='fixed',
                              **kwargs):
        server_ip = self.os_conn.get_nova_instance_ips(server)[ip_type]
        with self.os_conn.ssh_to_instance(
                self.env,
                client,
                username='ubuntu',
                vm_keypair=self.instance_keypair) as remote:
            for line in self.get_iperf_result(remote, server_ip, **kwargs):
                bandwidth = int(line[8])
                if bandwidth < 0.8 * limit:
                    raise Exception(
                        'Bandwidth is too low: {0}, limit is {1}'.format(
> bandwidth, limit))
E Exception: Bandwidth is too low: 3512729, limit is 4403200

Tags: area-qa
Revision history for this message
Georgy Dyuldin (g-dyuldin) wrote :
Changed in mos:
status: Confirmed → In Progress
Changed in mos:
importance: Undecided → High
Changed in mos:
milestone: 10.0 → 9.0
Changed in mos:
status: In Progress → Fix Released
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.