Metadata Agent: Disappears from agent-list command after ovn-controller is restarted

Bug #1835226 reported by Lucas Alvares Gomes on 2019-07-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-ovn
Medium
Lucas Alvares Gomes

Bug Description

The OVN metadata agent uses the Chassis entry from the ovn-controller to register the information about its liveness. When the ovn-controller is gracefully stopped it will remove it's entry from the Chassis table in the OVN Southbound database, e.g:

$ openstack network agent list
+--------------------------------------+------------------------------+------------------+-------------------+-------+-------+-------------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+------------------------------+------------------+-------------------+-------+-------+-------------------------------+
| 677d30a9-fe9c-4ad9-9da1-a8ce39ed4d07 | OVN Metadata agent | ubuntu-hash-ring | n/a | :-) | UP | networking-ovn-metadata-agent |
| ba24c259-f841-499a-905e-3aefdc963b11 | OVN Controller Gateway agent | ubuntu-hash-ring | n/a | :-) | UP | ovn-controller |
+--------------------------------------+------------------------------+------------------+-------------------+-------+-------+-------------------------------+
$ sudo systemctl stop <email address hidden>
$ openstack network agent list

Now, once it's back up the OVN Metadata agent still won't show up because it only registers itself in the Chassis entry at start up time:

$ sudo systemctl start <email address hidden>
$ openstack network agent list
+--------------------------------------+------------------------------+------------------+-------------------+-------+-------+----------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+------------------------------+------------------+-------------------+-------+-------+----------------+
| 9ab21ba8-d59d-4318-987c-74e3ed74ab94 | OVN Controller Gateway agent | ubuntu-hash-ring | n/a | :-) | UP | ovn-controller |
+--------------------------------------+------------------------------+------------------+-------------------+-------+-------+----------------+

The workaround here is to restart the metadata agent, so it re-register itself and show up in the agent list again:

$ sudo systemctl restart <email address hidden>
$ openstack network agent list
+--------------------------------------+------------------------------+------------------+-------------------+-------+-------+-------------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+------------------------------+------------------+-------------------+-------+-------+-------------------------------+
| 9ab21ba8-d59d-4318-987c-74e3ed74ab94 | OVN Controller Gateway agent | ubuntu-hash-ring | n/a | :-) | UP | ovn-controller |
| f503563c-55f6-4929-8a40-be0e820c3f80 | OVN Metadata agent | ubuntu-hash-ring | n/a | :-) | UP | networking-ovn-metadata-agent |
+--------------------------------------+------------------------------+------------------+-------------------+-------+-------+-------------------------------+

Changed in networking-ovn:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Lucas Alvares Gomes (lucasagomes)

Fix proposed to branch: master
Review: https://review.opendev.org/668923

Changed in networking-ovn:
status: Confirmed → In Progress

Reviewed: https://review.opendev.org/668923
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=adb0d45613ca1493289410b53b16fe9f731d1141
Submitter: Zuul
Branch: master

commit adb0d45613ca1493289410b53b16fe9f731d1141
Author: Lucas Alvares Gomes <email address hidden>
Date: Wed Jul 3 15:08:20 2019 +0100

    OVN Metadata: Fix registration after Chassis entry is recreated

    This patch is re-registring the OVN metadata agent to its Chassis when the
    entry is recreated. The Chassis entry gets deleted by the ovn-controller
    process when it's gracefully shutdown and recreated when restarted.

    Closes-Bug: #1835226
    Change-Id: I18f1ff0832354ae8109323e5202e1681fc60a167
    Signed-off-by: Lucas Alvares Gomes <email address hidden>

Changed in networking-ovn:
status: In Progress → Fix Released

Reviewed: https://review.opendev.org/671307
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=1aa06cb1f8e0f0be50bc7912326c0099331b4a2e
Submitter: Zuul
Branch: stable/stein

commit 1aa06cb1f8e0f0be50bc7912326c0099331b4a2e
Author: Lucas Alvares Gomes <email address hidden>
Date: Wed Jul 3 15:08:20 2019 +0100

    OVN Metadata: Fix registration after Chassis entry is recreated

    This patch is re-registring the OVN metadata agent to its Chassis when the
    entry is recreated. The Chassis entry gets deleted by the ovn-controller
    process when it's gracefully shutdown and recreated when restarted.

    Conflicts:
     networking_ovn/tests/functional/test_metadata_agent.py

    Closes-Bug: #1835226
    Change-Id: I18f1ff0832354ae8109323e5202e1681fc60a167
    Signed-off-by: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit adb0d45613ca1493289410b53b16fe9f731d1141)

tags: added: in-stable-stein

Reviewed: https://review.opendev.org/671310
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=b54009636719aaeb3c6967c866da2f7f80c840e9
Submitter: Zuul
Branch: stable/rocky

commit b54009636719aaeb3c6967c866da2f7f80c840e9
Author: Lucas Alvares Gomes <email address hidden>
Date: Wed Jul 3 15:08:20 2019 +0100

    OVN Metadata: Fix registration after Chassis entry is recreated

    This patch is re-registring the OVN metadata agent to its Chassis when the
    entry is recreated. The Chassis entry gets deleted by the ovn-controller
    process when it's gracefully shutdown and recreated when restarted.

    Conflicts:
     networking_ovn/tests/functional/test_metadata_agent.py

    Closes-Bug: #1835226
    Change-Id: I18f1ff0832354ae8109323e5202e1681fc60a167
    Signed-off-by: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit adb0d45613ca1493289410b53b16fe9f731d1141)

tags: added: in-stable-rocky
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers