Instance creation fails with with HTTP 500 - IndexError: list index out of range
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Sahid Orentino |
Bug Description
The problem is happening when there are more ports created in neutron than the
quota on it.
In this case, neutron client api will return a negative number for
max_net_count, which will be used as a total number of instances that should
be provisioned, and as a result none are being provisioned.
This caused the above exception to be raised.
_create_instance()
|
|--> base_options, max_net_count = self._validate_
| |
| max_network_count = self._check_
| |
| self.network_
| |
| `-->
| free_ports = quotas.get('port') - len(ports)
| ports_needed = ports_needed_
| if free_ports >= ports_needed:
| return num_instances
| else:
| return free_ports // ports_needed_
|
| # Continuing in _create_instance max_count gets the value of
| # max_net_count:
|
|--> elif max_net_count < max_count:
| LOG.debug(_("max count reduced from %(max_count)d to "
| "%(max_net_count)d due to network port quota"),
| {'max_count': max_count,
| 'max_net_count': max_net_count})
| max_count = max_net_count
|
| # Now, _provision_
| # number of instances
|--> instances = self._provision
|
`-> LOG.debug(_("Going to run %s instances..") % num_instances)
server = self._view_
IndexError: list index out
Changed in nova: | |
assignee: | nobody → Vladik Romanovsky (vladik-romanovsky) |
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in nova: | |
assignee: | Vladik Romanovsky (vladik-romanovsky) → sahid (sahid-ferdjaoui) |
Changed in nova: | |
milestone: | none → kilo-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-2 → 2015.1.0 |
Fix proposed to branch: master /review. openstack. org/140888
Review: https:/