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
Change-Id: I12c9c1ae6ca27727e8742060647dbe7017cded08
(cherry picked from commit 66246c4c9b6f766f40ee922c38c46f35bb02ae70)
Reviewed: https:/ /review. openstack. org/387859 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=73e17c3c2e3 041aaaff43896c0 23d1a63cd0ce1f
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 73e17c3c2e3041a aaff43896c023d1 a63cd0ce1f
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 f40ee922c38c46f 35bb02ae70)
Change-Id: I12c9c1ae6ca277
(cherry picked from commit 66246c4c9b6f766