[OVN]ControllerAgent cannot be changed to ControllerGatewayAgent dynamically

Bug #1934420 reported by ZhouHeng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Elvira García Ruiz

Bug Description

I have 3 nodes. NodeA, NodeB, NodeC.

I execute cmd 'ovs-vsctl set open_vswitch . external-ids:ovn-cms-options=enable-chassis-as-gw' in NodeA and NodeV, as gateway Node.

show agent list by executing the command 'openstack network agent list':

NodeA is 'OVN Controller Gatewaty agent'
NodeB is 'OVN Controller Gatewaty agent'
NodeC is 'OVN Controller agent'

the result is the same as I expected.

next I execute cmd 'ovs-vsctl set open_vswitch . external-ids:ovn-cms-options=enable-chassis-as-gw' in NodeC,

show agent list by executing the command 'openstack network agent list':

NodeA is 'OVN Controller Gatewaty agent'
NodeB is 'OVN Controller Gatewaty agent'
NodeC is 'OVN Controller agent'

The NodeC is still 'OVN Controller agent', not 'OVN Controller Gatewaty agent', The command has been executed many times and the result is still unchanged.

But as long as I execute the command to restart the neutron service, the result will be correct. NodeC is 'OVN Controller Gatewaty agent'.

Similarly, the 'OVN Controller Gatewaty agent' cannot be turned into 'OVN Controller agent' without restarting the neutron service.

ZhouHeng (zhouhenglc)
tags: added: ovn
Changed in neutron:
importance: Undecided → Low
Miguel Lavalle (minsel)
Changed in neutron:
status: New → Confirmed
Changed in neutron:
assignee: nobody → Elvira García Ruiz (elviragr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/800278

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/800278
Committed: https://opendev.org/openstack/neutron/commit/9cffd7b3223c2e8c88129c79aa62c255350c55d4
Submitter: "Zuul (22348)"
Branch: master

commit 9cffd7b3223c2e8c88129c79aa62c255350c55d4
Author: Elvira García <email address hidden>
Date: Fri Jul 9 17:55:56 2021 +0200

    [OVN] Change ControllerAgent type dinamically

    The ControllerAgent class now changes in Openstack when changing the
    type of an agent in its ovsdb table. This is possible thanks to adding a
    new condition to the event that triggered the update of the AgentCache.
    If the right external_ids changed, a new agent with the correct class
    will replace the old one in the AgentCache. Also adds functional
    tests to check this.

    Closes-Bug: #1934420

    Signed-off-by: Elvira García <email address hidden>
    Change-Id: I75380c455864aa055e8049a6beff8619687b52ce

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 19.0.0.0rc1

This issue was fixed in the openstack/neutron 19.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/neutron/+/814654

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/814654
Committed: https://opendev.org/openstack/neutron/commit/13c0287ac7b50dff522785e1079426f8e718eb7f
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 13c0287ac7b50dff522785e1079426f8e718eb7f
Author: Elvira García <email address hidden>
Date: Fri Jul 9 17:55:56 2021 +0200

    [OVN] Change ControllerAgent type dinamically

    The ControllerAgent class now changes in Openstack when changing the
    type of an agent in its ovsdb table. This is possible thanks to adding a
    new condition to the event that triggered the update of the AgentCache.
    If the right external_ids changed, a new agent with the correct class
    will replace the old one in the AgentCache. Also adds functional
    tests to check this.

    Closes-Bug: #1934420

    Signed-off-by: Elvira García <email address hidden>
    Change-Id: I75380c455864aa055e8049a6beff8619687b52ce
    (cherry picked from commit 9cffd7b3223c2e8c88129c79aa62c255350c55d4)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/822307

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by "yatin <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/822307
Reason: Based on last comment

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 18.2.0

This issue was fixed in the openstack/neutron 18.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.