Public bug reported:

In compute.api.API._create_instance() we have a min_count that is
optionally passed in by the end user as part of the boot request.

We calculate max_net_count based on networking constraints.

Currently we error out if max_net_count is zero, but we don't check it
against min_count.  If the end user specifies a min_count that is
greater than the calculated  max_net_count the resulting error isn't
very useful.

We know that min_count is guaranteed to be at least 1, so we can replace
the existing test against zero with one against min_count.  Doing this
gives a much more reasonable error message:

controller-0:~$ nova boot --image myimage --flavor simple --min-count 2 
--max-count 3 test
ERROR (Forbidden): Maximum number of ports exceeded (HTTP 403) (Request-ID: 
req-f7ff28bf-5708-4cbf-a634-2e9686afd970)

** Affects: nova
     Importance: Undecided
     Assignee: Chris Friesen (cbf123)
         Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1549032

Title:
  max_net_count doesn't interact properly with min_count when booting
  multiple instances

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  In compute.api.API._create_instance() we have a min_count that is
  optionally passed in by the end user as part of the boot request.

  We calculate max_net_count based on networking constraints.

  Currently we error out if max_net_count is zero, but we don't check it
  against min_count.  If the end user specifies a min_count that is
  greater than the calculated  max_net_count the resulting error isn't
  very useful.

  We know that min_count is guaranteed to be at least 1, so we can
  replace the existing test against zero with one against min_count.
  Doing this gives a much more reasonable error message:

  controller-0:~$ nova boot --image myimage --flavor simple --min-count 2 
--max-count 3 test
  ERROR (Forbidden): Maximum number of ports exceeded (HTTP 403) (Request-ID: 
req-f7ff28bf-5708-4cbf-a634-2e9686afd970)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1549032/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to