ec2 api shoud check the 'max_count' and 'min_count' para in run_instances

Bug #1267382 reported by lizheming
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
lizheming

Bug Description

the code:
def run_instances(self, context, **kwargs):
        min_count = int(kwargs.get('min_count', 1))
        ...
       (instances, resv_id) = self.compute_api.create(context,
            instance_type=obj_base.obj_to_primitive(flavor),
            image_href=image_uuid,
            max_count=int(kwargs.get('max_count', min_count)),
            min_count=min_count,
        ...

there is no checking to 'min_count' and 'max_count',
if 'min_count'>max_count, it will be error.

lizheming (lizheming-li)
Changed in nova:
assignee: nobody → lizheming (lizheming-li)
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/65904

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

Reviewed: https://review.openstack.org/65904
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=92ed0d939944f6c011d6c7baadbbbed1bc23f881
Submitter: Jenkins
Branch: master

commit 92ed0d939944f6c011d6c7baadbbbed1bc23f881
Author: lizheming <email address hidden>
Date: Fri Jan 10 16:44:44 2014 +0800

    ec2 api should check 'max_count'&'min_count' para

    in ec2 api,run_instance method have not check para
    about 'max_count' and 'min_count'

    Change-Id: I852dac71e56c658a54b127053cba155e1a260a73
    Closes-Bug: #1267382

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-3
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.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.