test_assign_ip_multiple_groups fails sometimes

Bug #1518268 reported by Valentin Kaplov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Ihor Kalnytskyi

Bug Description

Next test
nailgun.test.integration.test_network_manager.TestNetworkManager#test_assign_ip_multiple_groups fails if run integration tests. If run the test separately, then it passed successfully.

##################################
            self.assertIn(
                IPAddress(ip.ip_addr),
> IPNetwork(mgmt_net.cidr)
            )
E AssertionError: IPAddress('9.9.9.1') not found in IPNetwork('192.168.0.0/24')
##################################

Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
description: updated
Revision history for this message
Ilya Kutukov (ikutukov) wrote :

It seems to be some accumulated state provoking this issue.
Is it possible to determine what test or test group that run before causes test_assign_ip_multiple_groups failure?

Changed in fuel:
importance: Undecided → High
milestone: none → 8.0
status: New → Confirmed
importance: High → Medium
status: Confirmed → Incomplete
Revision history for this message
Valentin Kaplov (vkaplov) wrote :

Not sure, but looks like after run once unit tests the issue comes out.
Issue go away after cleanuping db.
####
python manage.py dropdb
python manage.py syncdb
####

Dmitry Pyzhov (dpyzhov)
tags: added: tech-debt
Revision history for this message
Valentin Kaplov (vkaplov) wrote :
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: Incomplete → Confirmed
milestone: 8.0 → 9.0
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
importance: Medium → High
milestone: 9.0 → 8.0
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Igor Kalnitsky (ikalnitsky)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

Fix proposed to branch: master
Review: https://review.openstack.org/262552

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/262552
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=7ad94b754d5b1faabbad265a16932a1411e55812
Submitter: Jenkins
Branch: master

commit 7ad94b754d5b1faabbad265a16932a1411e55812
Author: Igor Kalnitsky <email address hidden>
Date: Wed Dec 30 17:23:48 2015 +0200

    Fix test_assign_ip_multiple_groups random failures

    Recently the test 'test_assign_ip_multiple_groups' has a random failure
    that was depended on the order of entries selected from database. The
    test had two errors:

    * It didn't change network's CIDR, so node's IP address was checked
      for containing with incorrect (old) CIDR.
    * The new IP range was created, but old ones weren't removed. So when
      IP allocation code picked old IP range - the test is passed; when
      the new IP range is picked - the test is failed.

    Change-Id: Ib792ea1e4910a568d8bf44c6c6ba8afff0402b3f
    Closes-Bug: #1518268

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Artem Roma (aroma-x) wrote :

Move to confirmed since there is no backport to 8.0 branch.

Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/8.0)

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/269570

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (stable/8.0)

Reviewed: https://review.openstack.org/269570
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=8897592b93362b1b1f913700e6e3516277bffb70
Submitter: Jenkins
Branch: stable/8.0

commit 8897592b93362b1b1f913700e6e3516277bffb70
Author: Igor Kalnitsky <email address hidden>
Date: Wed Dec 30 17:23:48 2015 +0200

    Fix test_assign_ip_multiple_groups random failures

    Recently the test 'test_assign_ip_multiple_groups' has a random failure
    that was depended on the order of entries selected from database. The
    test had two errors:

    * It didn't change network's CIDR, so node's IP address was checked
      for containing with incorrect (old) CIDR.
    * The new IP range was created, but old ones weren't removed. So when
      IP allocation code picked old IP range - the test is passed; when
      the new IP range is picked - the test is failed.

    Change-Id: Ib792ea1e4910a568d8bf44c6c6ba8afff0402b3f
    Closes-Bug: #1518268
    (cherry picked from commit 7ad94b754d5b1faabbad265a16932a1411e55812)

Revision history for this message
Artem Roma (aroma-x) wrote :

Fix was merged to stable/8.0w branch hence I move this bug to 'fix committed' status

Changed in fuel:
status: Confirmed → Fix Committed
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.