don't catch ProcessExecutionError exception as special case
When plugging / unplugging vifs we should not be assuming that the plugin will be running external commands - it could easily be calling other python libraries to do its work. Thus we should not catch ProcessExecutionError as a special case, but instead handle any type of exception Change-Id: Ic03279f6bb6de4bd72dfee7c117cf8502decfec5
This commit is contained in:
parent
664d363857
commit
1339a4516f
@ -10,7 +10,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_log import log as logging
|
||||
from stevedore import extension
|
||||
|
||||
@ -95,7 +94,7 @@ def plug(vif, instance):
|
||||
LOG.debug("Plugging vif %s", vif)
|
||||
plugin.plug(vif, instance)
|
||||
LOG.info(_LI("Successfully plugged vif %s"), vif)
|
||||
except processutils.ProcessExecutionError as err:
|
||||
except Exception as err:
|
||||
LOG.error(_LE("Failed to plug vif %(vif)s. Got error: %(err)s"),
|
||||
vif=vif, err=err)
|
||||
raise os_vif.exception.PlugException(vif=vif, err=err)
|
||||
@ -127,7 +126,7 @@ def unplug(vif):
|
||||
LOG.debug("Unplugging vif %s", vif)
|
||||
plugin.unplug(vif)
|
||||
LOG.info(_LI("Successfully unplugged vif %s"), vif)
|
||||
except processutils.ProcessExecutionError as err:
|
||||
except Exception as err:
|
||||
LOG.error(_LE("Failed to unplug vif %(vif)s. Got error: %(err)s"),
|
||||
vif=vif, err=err)
|
||||
raise os_vif.exception.UnplugException(vif=vif, err=err)
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
pbr>=1.6
|
||||
netaddr>=0.7.12,!=0.7.16
|
||||
oslo.concurrency>=2.3.0 # Apache-2.0
|
||||
oslo.log>=1.14.0 # Apache-2.0
|
||||
oslo.i18n>=1.5.0 # Apache-2.0
|
||||
oslo.versionedobjects>=0.13.0
|
||||
|
Loading…
Reference in New Issue
Block a user