This is a script that can be used to recreate this. Pass in the number of instances you want, I used 30 and had one instance go over the quota limit and fail the recheck in conductor.
#!/bin/bash
set -x
NUM=$1
IMAGE=$2
for i in `seq 1 $NUM`; do
nova boot --flavor 1 --image $IMAGE test-over-quota-$i &
done
As a result of this, I found that the instance didn't actually go into ERROR state because of another bug:
Sep 13 17:58:26 devstack-queens nova-conductor[3129]: WARNING nova.scheduler.utils [None req-90a115b2-5838-4be2-afe2-a3b755015e19 demo demo] [instance: 888925b0-164a-4d4a-bb6c-c0426f904e95] Setting instance to ERROR state.: TooManyInstances: Quota exceeded for instances: Requested 1, but already used 10 of 10 instances
Sep 13 17:58:26 devstack-queens nova-conductor[3129]: ERROR root [None req-90a115b2-5838-4be2-afe2-a3b755015e19 demo demo] Original exception being dropped: ['Traceback (most recent call last):\n', ' File "/opt/stack/nova/nova/conductor/manager.py", line 1003, in schedule_and_build_instances\n orig_num_req=len(build_requests))\n', ' File "/opt/stack/nova/nova/compute/utils.py", line 764, in check_num_instances_quota\n allowed=total_alloweds)\n', 'TooManyInstances: Quota exceeded for instances: Requested 1, but already used 10 of 10 instances\n']: InstanceNotFound: Instance 888925b0-164a-4d4a-bb6c-c0426f904e95 could not be found.
Sep 13 17:58:26 devstack-queens nova-conductor[3129]: ERROR oslo_messaging.rpc.server [None req-90a115b2-5838-4be2-afe2-a3b755015e19 demo demo] Exception during message handling: InstanceNotFound: Instance 888925b0-164a-4d4a-bb6c-c0426f904e95 could not be found.
Sep 13 17:58:26 devstack-queens nova-conductor[3129]: ERROR oslo_messaging.rpc.server InstanceNotFound: Instance 888925b0-164a-4d4a-bb6c-c0426f904e95 could not be found.
Because we don't target the cell when updating the instance.
This is a script that can be used to recreate this. Pass in the number of instances you want, I used 30 and had one instance go over the quota limit and fail the recheck in conductor.
#!/bin/bash
set -x
NUM=$1
IMAGE=$2
for i in `seq 1 $NUM`; do
nova boot --flavor 1 --image $IMAGE test-over-quota-$i &
done
As a result of this, I found that the instance didn't actually go into ERROR state because of another bug:
Sep 13 17:58:26 devstack-queens nova-conductor[ 3129]: WARNING nova.scheduler. utils [None req-90a115b2- 5838-4be2- afe2-a3b755015e 19 demo demo] [instance: 888925b0- 164a-4d4a- bb6c-c0426f904e 95] Setting instance to ERROR state.: TooManyInstances: Quota exceeded for instances: Requested 1, but already used 10 of 10 instances 3129]: ERROR root [None req-90a115b2- 5838-4be2- afe2-a3b755015e 19 demo demo] Original exception being dropped: ['Traceback (most recent call last):\n', ' File "/opt/stack/ nova/nova/ conductor/ manager. py", line 1003, in schedule_ and_build_ instances\ n orig_num_ req=len( build_requests) )\n', ' File "/opt/stack/ nova/nova/ compute/ utils.py" , line 764, in check_num_ instances_ quota\n allowed= total_alloweds) \n', 'TooManyInstances: Quota exceeded for instances: Requested 1, but already used 10 of 10 instances\n']: InstanceNotFound: Instance 888925b0- 164a-4d4a- bb6c-c0426f904e 95 could not be found. 3129]: ERROR oslo_messaging. rpc.server [None req-90a115b2- 5838-4be2- afe2-a3b755015e 19 demo demo] Exception during message handling: InstanceNotFound: Instance 888925b0- 164a-4d4a- bb6c-c0426f904e 95 could not be found. 3129]: ERROR oslo_messaging. rpc.server InstanceNotFound: Instance 888925b0- 164a-4d4a- bb6c-c0426f904e 95 could not be found.
Sep 13 17:58:26 devstack-queens nova-conductor[
Sep 13 17:58:26 devstack-queens nova-conductor[
Sep 13 17:58:26 devstack-queens nova-conductor[
Because we don't target the cell when updating the instance.
https:/ /github. com/openstack/ nova/blob/ cfdec41eeec5fab 220702efefdaafc 45559aeb14/ nova/conductor/ manager. py#L1168