Folsom - Absolute limit parameters totalKeyPairsUsed and totalSecurityGroupsUsed values area not incremented when keypair and security group created

Bug #1062049 reported by muralik
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Mark McLoughlin
Folsom
Fix Released
Low
Mark McLoughlin

Bug Description

Description:
--------------
Absolute parameter totalKeyPairsUsed should increase its value when we create new keypair and also decrease when we delete keypair from existing keypair list. Observed totalKeyPairsUsed value is not changed when keypair is created.
Also observed the same for totalSecurityGroupsUsed parameter, i.e. totalSecurityGroupsUsed value is not changed after creating security group.

Environment:
--------------
Folsom

Step to Reproduce for totalKeyPairsUsed defect:
--------------

1) Get the totalKeyPairsUsed value before creating keypair

$nova absolute-limits |grep totalKeyPairsUsed
| totalKeyPairsUsed | 0 |

2) Create a keypair
$nova keypair-add test1
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQC3EbOOW8JiAquBcO7UK4WVc+Utb7I9KY5YbsKLxk2s07HqgzCF
RVeEE12cZgWurKv1I4yPln3E9/ZkAuEYT0GaXSIcv0AMw/jpAp69+7HP7Loe2f0U
4q9HK83xNp2UPc4aw6D/f3xv6MXUcLWC2NIzTujAFVbyj3h0cqXD9w67ZQIDAQAB
AoGAJwGyjIaoqFGBUZdKjBKp5+pFzqSaCcYs+lK/SSD7s/N3WUySrhLUTuQBci2a
0FkiWp00efPK4IklCrJCW/enNmyYCh/GSJZRyHe8B4fO5yCsPgER4OLLzZqE4sC3
o83/vnux5fYz4Sfw398hHYF2trDWYdqs5KFVZ9htgRp0jBECQQDZ7BqVW1dszIBx
+Y6TmTNZebF739tdx3KjRp+cQVkHSbOKDiGqsKDf8eLyDR1A8gs4QaNa14/mSWnD
Ci13KzEzAkEA1w6UY9FXnKXw3D2nmYzchyndimiS0xBy0DN6RcPpkKZYyfTOk5Ib
0Na7viUMcsQRXS2Nfis2scyuxKEPRvQRBwJBAKo3R1ReMl1jJvjfisQzJ+69pSoy
4m/Pt/Vc1pMAX//XS4uMGjPvHtmNYEzcfXsbFDRu4J+2PEoOEbQsoPKyJA0CQQCt
LdFzHDZIMBzozkFz1koUEjOT7KgnjTxXysxw99XTJRGk+B2OGn+JyhH/icgfdyJg
fXlOm6/8t84ZC3XI9mvrAkB/4/KWjrEVp96G5hac01oQTAM20+hKISOM2UGQ0D3H
yBV0cvbfVzVcKjKSzzak1GAUHsJwZNCeZCUmBAFoyoZA
-----END RSA PRIVATE KEY-----

$nova keypair-list
+-----------------------+-------------------------------------------------+
| Name | Fingerprint |
+-----------------------+-------------------------------------------------+
| test1 | 5e:b3:e9:30:0f:c1:44:c7:4b:6f:a4:0b:04:77:76:17 |
+-----------------------+-------------------------------------------------+

3) Verify totalKeyPairsUsed value after creating keypair

$nova absolute-limits |grep totalKeyPairsUsed
| totalKeyPairsUsed | 0 |

OBSERVATION:
--------------

totalKeyPairsUsed value is not incremented after creating a keypair

Step to Reproduce for totalSecurityGroupsUsed defect:
--------------

1) Get the totalSecurityGroupsUsed value before creating SecurityGroup

$nova absolute-limits | grep totalSecurityGroupsUsed
| totalSecurityGroupsUsed | 0 |

2) Create a SecurityGroup

$nova secgroup-create test_sg1 test_sg1_description
+----------+----------------------+
| Name | Description |
+----------+----------------------+
| test_sg1 | test_sg1_description |
+----------+----------------------+

$nova secgroup-list
+--------------+----------------------+
| Name | Description |
+--------------+----------------------+
| default | default |
| test_sg1 | test_sg1_description |
+--------------+----------------------+

3) Verify totalSecurityGroupsUsed value after creating SecurityGroup

$nova absolute-limits | grep totalSecurityGroupsUsed
| totalSecurityGroupsUsed | 0 |

OBSERVATION:
--------------

totalSecurityGroupsUsed value is not incremented after creating a SecurityGroup

Revision history for this message
muralik (murali-koripally) wrote :

This defect also observed for below absolute limit parameters:
totalVolumesUsed
totalVolumeGigabytesUsed

OBSERVATION:
totalVolumesUsed value is not incremented after creating new volume
totalVolumeGigabytesUsed value is not incremented after creating new volume with GB

Revision history for this message
Mark McLoughlin (markmc) wrote :

I'm submitting a patch to fix some issues with used_limits and I've filed bug #1089877 to cover the specific issue with key pairs

Changed in nova:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Mark McLoughlin (markmc)
status: Confirmed → In Progress
Mark McLoughlin (markmc)
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/18123

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/18031
Committed: http://github.com/openstack/nova/commit/6c9d9ab434ba2ecfee1d556842d311390010957e
Submitter: Jenkins
Branch: master

commit 6c9d9ab434ba2ecfee1d556842d311390010957e
Author: Mark McLoughlin <email address hidden>
Date: Thu Dec 13 11:21:18 2012 +0000

    Fix errors in used_limits extension

    Fixes bug #1062049

    There was a typo mapping the security groups resource to floating IPs.

    Volumes usage isn't tracked by Nova any more since delete-nova-volume.

    Key pairs don't work with the extension because of bug #1089877.

    Change-Id: Ifd694b21fef1dc95e67c07dcef0cd6ea3daa8d53

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/folsom)

Reviewed: https://review.openstack.org/18123
Committed: http://github.com/openstack/nova/commit/f864a4e2e2a3cc5383e7dce6ad91f42880a64d1a
Submitter: Jenkins
Branch: stable/folsom

commit f864a4e2e2a3cc5383e7dce6ad91f42880a64d1a
Author: Mark McLoughlin <email address hidden>
Date: Thu Dec 13 11:21:18 2012 +0000

    Fix errors in used_limits extension

    Fixes bug #1062049

    There was a typo mapping the security groups resource to floating IPs.

    Key pairs don't work with the extension because of bug #1089877.

    (cherry picked from commit 6c9d9ab)

    Change-Id: Ifd694b21fef1dc95e67c07dcef0cd6ea3daa8d53

Mark McLoughlin (markmc)
Changed in nova:
milestone: grizzly-2 → 2012.2.3
status: Fix Released → Fix Committed
Mark McLoughlin (markmc)
Changed in nova:
milestone: 2012.2.3 → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
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.