test_security_groups is leaking

Bug #1283083 reported by Joe Hakim Rahme
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Ala Rezmerita

Bug Description

Running tempest.api.network.test_security_group will not cleanup the security groups it created.

To reproduce:

1. Start by counting the number of existing security groups (as an admin):

    ubuntu@devstack:/opt/stack/tempest$ source ~/devstack/openrc admin admin password
    ubuntu@devstack:/opt/stack/tempest$ neutron security-group-list | wc -l
    25

2. Run the test (it execute successfully):

    ubuntu@devstack:/opt/stack/tempest$ ./run_tempest.sh tempest.api.network.test_security_groups
    tempest.api.network.test_security_groups.SecGroupTest
        test_create_security_group_rule_with_additional_args[gate,smoke] OK 0.56
        test_create_show_delete_security_group[gate,smoke] OK 0.25
        test_create_show_delete_security_group_rule[gate,smoke] OK 0.76
        test_list_security_groups[gate,smoke] OK 0.05
    tempest.api.network.test_security_groups_negative.NegativeSecGroupTest
        test_create_additional_default_security_group_fails[gate,negative,smoke]OK 0.17
        test_create_security_group_rule_with_bad_protocol[gate,negative] OK 0.19
        test_create_security_group_rule_with_invalid_ports[gate,negative] OK 0.23
        test_create_security_group_rule_with_non_existent_security_group[gate,negative,smoke]OK 0.03
        test_delete_non_existent_security_group[gate,negative] OK 0.02
        test_show_non_existent_security_group[gate,negative] OK 0.01
        test_show_non_existent_security_group_rule[gate,negative] OK 0.01
    tempest.api.network.test_security_groups_negative.NegativeSecGroupTestXML
        test_create_additional_default_security_group_fails[gate,negative,smoke]OK 0.28
        test_create_security_group_rule_with_bad_protocol[gate,negative] OK 0.17
        test_create_security_group_rule_with_invalid_ports[gate,negative] OK 0.29
        test_create_security_group_rule_with_non_existent_security_group[gate,negative,smoke]OK 0.04
        test_delete_non_existent_security_group[gate,negative] OK 0.03
        test_show_non_existent_security_group[gate,negative] OK 0.01
        test_show_non_existent_security_group_rule[gate,negative] OK 0.02
    tempest.api.network.test_security_groups.SecGroupTestXML
        test_create_security_group_rule_with_additional_args[gate,smoke] OK 0.64
        test_create_show_delete_security_group[gate,smoke] OK 0.25
        test_create_show_delete_security_group_rule[gate,smoke] OK 0.73
        test_list_security_groups[gate,smoke] OK 0.03

    Slowest 7 tests took 3.51 secs:
    tempest.api.network.test_security_groups.SecGroupTestXML
        test_create_security_group_rule_with_additional_args[gate,smoke] 0.64
        test_create_show_delete_security_group[gate,smoke] 0.25
        test_create_show_delete_security_group_rule[gate,smoke] 0.73
    tempest.api.network.test_security_groups.SecGroupTest
        test_create_security_group_rule_with_additional_args[gate,smoke] 0.56
        test_create_show_delete_security_group_rule[gate,smoke] 0.76
    tempest.api.network.test_security_groups_negative.NegativeSecGroupTestXML
        test_create_additional_default_security_group_fails[gate,negative,smoke] 0.28
        test_create_security_group_rule_with_invalid_ports[gate,negative] 0.29

    Ran 22 tests in 6.370s

    OK

3. Count the number of secgroups now:

    ubuntu@devstack:/opt/stack/tempest$ neutron security-group-list | wc -l
    29

Revision history for this message
Ala Rezmerita (arezmerita) wrote :

For the tests tempest will create new tenant/user. When tempest create an security group for the test, the default security group is also created.
At the end of the tests, secgroups created during the tests are cleaned, but not the default group.

Changed in tempest:
assignee: nobody → Ala Rezmerita (arezmerita)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
status: New → In Progress
Changed in tempest:
assignee: Ala Rezmerita (arezmerita) → Sean Dague (sdague)
Changed in tempest:
assignee: Sean Dague (sdague) → Ala Rezmerita (arezmerita)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/79275
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=846eb7c95f502b10086f8db496891489b9fce2c3
Submitter: Jenkins
Branch: master

commit 846eb7c95f502b10086f8db496891489b9fce2c3
Author: Ala Rezmerita <email address hidden>
Date: Mon Mar 10 09:06:03 2014 +0100

    Cleanup neutron default security groups on tenant deletion

    This fix cleanups tenant default security groups that are
    automatically created and must be deleted on tenant deletion

    Change-Id: Ifcf5ec0391799110f158d113f1b6db8a55a31da9
    Closes-Bug: #1283083

Changed in tempest:
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.