← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1529439] Re: unify validate_agent_router_combination exceptions for dvr agent_mode

 

Reviewed:  https://review.openstack.org/261793
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a2cfd9fcd67f392d9ad70868fa358afc7aa1b4c3
Submitter: Jenkins
Branch:    master

commit a2cfd9fcd67f392d9ad70868fa358afc7aa1b4c3
Author: lzklibj <lzklibj@xxxxxxxxxx>
Date:   Sun Dec 27 14:08:36 2015 +0800

    Unify exceptions for assign router to dvr agent
    
    validate_agent_router_combination use two different exceptions
    for assigning a router to an agent in 'dvr' mode:
      RouterL3AgentMismatch: assign dvr router to legacy agent.
      DVRL3CannotAssignToDvrAgent: assign dvr router to (another) dvr agent.
    
    This should be unified to one single exception, for routers on agent in
    'dvr' mode should be only scheduled, not allowed to be manually assigned.
    
    Change-Id: I3673c4c6852105f86b3aac390d0aabc75944de9d
    Closes-Bug: #1529439


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1529439

Title:
  unify validate_agent_router_combination exceptions for dvr agent_mode

Status in neutron:
  Fix Released

Bug description:
  in method validate_agent_router_combination
  (https://github.com/openstack/neutron/blob/master/neutron/db/l3_agentschedulers_db.py#L157)
  , it will validate if the router can be correctly assigned to the
  agent.

  And it will raise two different exceptions for dvr agent_mode agent,
  https://github.com/openstack/neutron/blob/master/neutron/db/l3_agentschedulers_db.py#L176-L187
  :

          is_agent_router_types_incompatible = (
              agent_mode == constants.L3_AGENT_MODE_DVR and not is_distributed
              or agent_mode == constants.L3_AGENT_MODE_LEGACY and is_distributed
          )
          if is_agent_router_types_incompatible:
              raise l3agentscheduler.RouterL3AgentMismatch(
                  router_type=router_type, router_id=router['id'],
                  agent_mode=agent_mode, agent_id=agent['id'])
          if agent_mode == constants.L3_AGENT_MODE_DVR and is_distributed:
              raise l3agentscheduler.DVRL3CannotAssignToDvrAgent(
                  router_type=router_type, router_id=router['id'],
                  agent_id=agent['id'])

  this should be unified and simplified for a single reason that "DVR
  router on dvr agent_mode agent should be only scheduled, not manually
  assigned."

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1529439/+subscriptions


References