Frequently update Chassis external_ids high cpu usage on ovn-controller process

Bug #1877544 reported by LI.Yujie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Released
Undecided
Unassigned

Bug Description

commit : https://github.com/openstack/networking-ovn/commit/7cf92ee960697d284f58ab9c26dab607b3685f57

    def agent_alive(self, chassis, type_):
        nb_cfg = chassis.nb_cfg
        id_ = chassis.uuid
        key = ovn_const.OVN_LIVENESS_CHECK_EXT_ID_KEY
        if type_ == ovn_const.OVN_METADATA_AGENT:
            id_ = utils.ovn_metadata_name(chassis.uuid)
            nb_cfg = int(chassis.external_ids.get(
                ovn_const.OVN_AGENT_METADATA_SB_CFG_KEY, 0))
            key = ovn_const.METADATA_LIVENESS_CHECK_EXT_ID_KEY

        try:
            updated_at = timeutils.parse_isotime(chassis.external_ids[key])
        except KeyError:
            updated_at = timeutils.utcnow(with_timezone=True)

        if self._nb_ovn.nb_global.nb_cfg == nb_cfg:
            # update the time of our successful check
            value = timeutils.utcnow(with_timezone=True).isoformat()
            self._sb_ovn.db_set('Chassis', chassis.uuid,
                                ('external_ids', {key: value})).execute(
                check_error=True)

[root@openstack-con01 ~(keystone_admin)]# ovn-sbctl list Chassis 7cc5646c-6eb1-4998-85d0-74e9bd7f385f
_uuid : 984ad0f6-478d-4fa5-a863-5e5da9642756
encaps : [1c7ac35f-2298-4ce6-81be-775826ef5221, e28e49e9-8e98-413b-a5f1-0c58f15547bd]
external_ids : {datapath-type=system, iface-types="erspan,geneve,gre,internal,ip6erspan,ip6gre,lisp,patch,stt,system,tap,vxlan", is-interconn="false", "neutron:liveness_check_at"="2020-05-08T09:36:53.903170+00:00", ovn-bridge-mappings="", ovn-chassis-mac-mappings="", ovn-cms-options=""}
hostname : openstack-compute108
name : "7cc5646c-6eb1-4998-85d0-74e9bd7f385f"
nb_cfg : 22805
transport_zones : []
vtep_logical_switches: []
[root@openstack-con01 ~(keystone_admin)]# ovn-sbctl list Chassis 7cc5646c-6eb1-4998-85d0-74e9bd7f385f
_uuid : 984ad0f6-478d-4fa5-a863-5e5da9642756
encaps : [1c7ac35f-2298-4ce6-81be-775826ef5221, e28e49e9-8e98-413b-a5f1-0c58f15547bd]
external_ids : {datapath-type=system, iface-types="erspan,geneve,gre,internal,ip6erspan,ip6gre,lisp,patch,stt,system,tap,vxlan", is-interconn="false", "neutron:liveness_check_at"="2020-05-08T09:37:23.970521+00:00", ovn-bridge-mappings="", ovn-chassis-mac-mappings="", ovn-cms-options=""}
hostname : openstack-compute108
name : "7cc5646c-6eb1-4998-85d0-74e9bd7f385f"
nb_cfg : 22806
transport_zones : []
vtep_logical_switches: []

Frequently update Chassis external_id
high cpu usage on ovn-controller process

LI.Yujie (vermouthli)
Changed in networking-ovn:
status: New → Fix Released
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.