yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #30743
[Bug 1438738] [NEW] Nova boot fails with Error Code 500, if quota_port is < -1 in neutron.conf
Public bug reported:
I am running a scale environment where I needed to exceed the port quota
count to unlimited.
The neutron.conf documentation for the quota_port parameter states the
following:
# Number of ports allowed per tenant. A negative value means unlimited.
Looking at this, I had set the value to -2 as:
quota_port = -2
After this, the nova boot started failing with Error code 500.
The error stack is the following:
TRACE nova.api.openstack File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 1016, in create
TRACE nova.api.openstack server = self._view_builder.create(req, instances[0])
TRACE nova.api.openstack IndexError: list index out of range
TRACE nova.api.openstack
The error is seen because in the /nova/network/neutronv2/api.py -
validate_networks() method, the quota check is very strict in terms for
the unlimited check:
if quotas.get('port', -1) == -1:
# Unlimited Port Quota
return num_instances
else:
free_ports = quotas.get('port') - len(ports)
ports_needed = ports_needed_per_instance * num_instances
if free_ports >= ports_needed:
return num_instances
else:
return free_ports // ports_needed_per_instance
The above code would return free_ports - and that value is negative.
Filing this bug to change the above check to something like:
if quotas.get('port', -1) <= -1:
# Unlimited Port Quota
return num_instances
This will allow nova to react correctly with the documentation in
neutron as well.
** Affects: nova
Importance: Undecided
Assignee: Sudipta Biswas (sbiswas7)
Status: New
** Changed in: nova
Assignee: (unassigned) => Sudipta Biswas (sbiswas7)
--
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/1438738
Title:
Nova boot fails with Error Code 500, if quota_port is < -1 in
neutron.conf
Status in OpenStack Compute (Nova):
New
Bug description:
I am running a scale environment where I needed to exceed the port
quota count to unlimited.
The neutron.conf documentation for the quota_port parameter states the
following:
# Number of ports allowed per tenant. A negative value means
unlimited.
Looking at this, I had set the value to -2 as:
quota_port = -2
After this, the nova boot started failing with Error code 500.
The error stack is the following:
TRACE nova.api.openstack File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 1016, in create
TRACE nova.api.openstack server = self._view_builder.create(req, instances[0])
TRACE nova.api.openstack IndexError: list index out of range
TRACE nova.api.openstack
The error is seen because in the /nova/network/neutronv2/api.py -
validate_networks() method, the quota check is very strict in terms
for the unlimited check:
if quotas.get('port', -1) == -1:
# Unlimited Port Quota
return num_instances
else:
free_ports = quotas.get('port') - len(ports)
ports_needed = ports_needed_per_instance * num_instances
if free_ports >= ports_needed:
return num_instances
else:
return free_ports // ports_needed_per_instance
The above code would return free_ports - and that value is negative.
Filing this bug to change the above check to something like:
if quotas.get('port', -1) <= -1:
# Unlimited Port Quota
return num_instances
This will allow nova to react correctly with the documentation in
neutron as well.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1438738/+subscriptions
Follow ups
References