Fix exception due to BDM race in get_available_resource()
If we run the resource tracker periodic at the right time, we
may try to collect BDM info from a newly-created instance before
we have any BDM records for it. This patch excludes instances
that have no reported BDMs to avoid choking there. This also
adds a test which simulates an instance that is partially in
the database, but is not fully created.
Reviewed: https:/ /review. openstack. org/345162 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=66246c4c9b6 f766f40ee922c38 c46f35bb02ae70
Committed: https:/
Submitter: Jenkins
Branch: master
commit 66246c4c9b6f766 f40ee922c38c46f 35bb02ae70
Author: shi liang <email address hidden>
Date: Thu Jul 21 12:44:22 2016 +0800
Fix exception due to BDM race in get_available_ resource( )
If we run the resource tracker periodic at the right time, we
may try to collect BDM info from a newly-created instance before
we have any BDM records for it. This patch excludes instances
that have no reported BDMs to avoid choking there. This also
adds a test which simulates an instance that is partially in
the database, but is not fully created.
Closes-Bug: #1602057 27e8742060647db e7017cded08
Change-Id: I12c9c1ae6ca277