When nova-conductor received a NoValidHost (NVH) exception for a
cold migrate or resize operation, its error message back through
the API layer always displayed the string "cold migrate" in the
error text, even when the operation was a resize. This leads to
potentially confusing situations when triaging problems in the
cloud environment.
This patch corrects the error message based on the operation; we use
the flavor IDs as a way to determine what operation is really being
performed. In the case of a resize, different flavor IDs will be
used and they will be indentical in the case of a cold migration.
Note there was a lot of IRC discussion on this as well in terms of
the "algorithm" to check the operation type; the flavor ID check
is also used in the API layer as well since it's the only way you
can determine this given the underlying operation. We also tried
to make the error message more general, but the consensus was that
was pretty unfriendly from the user's perspective - so we've landed
with this approach again with the end users close to heart. :-)
Change-Id: I762425b2602c2798b94d3c770f2401dd0aedc942
Closes-Bug: #1364692