소스 검색

Merge "Ensure driver error preventing trunk port deletion is logged" into stable/stein

tags/14.1.0
Zuul Gerrit Code Review 1 개월 전
부모
커밋
36870b4f92
1개의 변경된 파일13개의 추가작업 그리고 3개의 파일을 삭제
  1. +13
    -3
      neutron/services/trunk/plugin.py

+ 13
- 3
neutron/services/trunk/plugin.py 파일 보기

@@ -25,6 +25,7 @@ from neutron_lib.db import resource_extend
from neutron_lib.plugins import directory
from neutron_lib.services import base as service_base
from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import uuidutils

from neutron.db import common_db_mixin
@@ -269,12 +270,21 @@ class TrunkPlugin(service_base.ServicePluginBase,
# object disappears from the datastore, therefore there is no
# status transition involved. If PRECOMMIT failures occur,
# the trunk remains in the status where it was.
trunk.delete()
try:
trunk.delete()
except Exception as e:
with excutils.save_and_reraise_exception():
LOG.warning('Trunk driver raised exception when '
'deleting trunk port %s: %s', trunk_id,
str(e))
payload = callbacks.TrunkPayload(context, trunk_id,
original_trunk=trunk)
registry.notify(constants.TRUNK, events.PRECOMMIT_DELETE, self,
payload=payload)
registry.notify(resources.TRUNK,
events.PRECOMMIT_DELETE,
self, payload=payload)
else:
LOG.info('Trunk driver does not consider trunk %s '
'untrunkable', trunk_id)
raise trunk_exc.TrunkInUse(trunk_id=trunk_id)
registry.notify(constants.TRUNK, events.AFTER_DELETE, self,
payload=payload)


불러오는 중...
취소
저장