Comment 9 for bug 1675422

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/nova (mcp/1.0/mitaka)

Reviewed: https://review.fuel-infra.org/36360
Submitter: Pkgs Jenkins <email address hidden>
Branch: mcp/1.0/mitaka

Commit: 03b2e9ca430493ca9a4bd8b7118b7a25d3758cbe
Author: Esha Seth <email address hidden>
Date: Thu Aug 31 17:38:34 2017

Add a no-op wait method to NetworkInfo

The normal deploy flow uses a NetworkInfoAsyncWrapper for network
allocation, and because of that many places have to call that class's
wait method to make sure it has completed. During a reschedule where
the network was allocated by a previous build attempt, a NetworkInfo
instance is retrieved instead, which does not have a wait method. This
then results in an exception complaining the missing method when it is
called. This fix addresses that by adding a no-op wait method to the
NetworkInfo class. Alternatively could have used isinstance or hasattr
to avoid making wait calls on NetworkInfo, but that could be
problematic to maintain as more places need to make wait calls in the
future and may not know to make the isinstance/hasattr check.

This fixes a regression issue caused by
61fc1b9ee11e416aecbf3a29e1d150a53fc890e8 ,
which reverted the previous fix made under
24a04c405ab2c98e52ea1edf8775489907526c6d

Closes-Bug: #1675422

PROD ticket: https://mirantis.jira.com/browse/PROD-14345

(cherry picked from commit 329cd1649703ac801b95fce28afa99b67f9f45aa)
Change-Id: Id7a71b2eb46ea7df19e7da0afbc0eafa87cac965