Public bug reported:

when we show an agent, we can check agent's alive and heartbeat time. but now 
agent's alive is False, 
it's last_heart_at close to the current time, and each show will refresh the 
last_heart_at.

The code[1] shows that the heartbeat time returns the current time, we
should return to the real update time


[1] 
https://opendev.org/openstack/neutron/src/commit/d253b9fd08b969ebab09a5624df127a4bf1bfb1f/neutron/plugins/ml2/drivers/ovn/agent/neutron_agent.py#L85

stack@openstack:~$ openstack network agent show 
d02fc630-4ac8-466f-9795-38e8177cfc55
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field             | Value                                                     
                                                                                
                                               |
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up    | UP                                                        
                                                                                
                                               |
| agent_type        | OVN Controller Gateway agent                              
                                                                                
                                               |
| alive             | XXX                                                       
                                                                                
                                               |
| availability_zone |                                                           
                                                                                
                                               |
| binary            | ovn-controller                                            
                                                                                
                                               |
| configuration     | {'chassis_name': 'd02fc630-4ac8-466f-9795-38e8177cfc55', 
'bridge-mappings': 'public:br-ex'}                                              
                                                |
| created_at        | None                                                      
                                                                                
                                               |
| description       |                                                           
                                                                                
                                               |
| ha_state          | None                                                      
                                                                                
                                               |
| host              | openstack                                                 
                                                                                
                                               |
| id                | d02fc630-4ac8-466f-9795-38e8177cfc55                      
                                                                                
                                               |
| last_heartbeat_at | 2022-06-04 01:59:27.926511                                
                                                                                
                                               |
| location          | Munch({'cloud': '', 'region_name': 'RegionOne', 'zone': 
'', 'project': Munch({'id': '40e85036922248828c47cededb23036b', 'name': 
'admin', 'domain_id': 'default', 'domain_name': None})}) |
| name              | None                                                      
                                                                                
                                               |
| resources_synced  | None                                                      
                                                                                
                                               |
| started_at        | None                                                      
                                                                                
                                               |
| topic             | n/a                                                       
                                                                                
                                               |
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

** Affects: neutron
     Importance: Undecided
     Assignee: ZhouHeng (zhouhenglc)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => ZhouHeng (zhouhenglc)

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

Title:
  [ovn]agent's heartbeat time is error

Status in neutron:
  New

Bug description:
  when we show an agent, we can check agent's alive and heartbeat time. but now 
agent's alive is False, 
  it's last_heart_at close to the current time, and each show will refresh the 
last_heart_at.

  The code[1] shows that the heartbeat time returns the current time, we
  should return to the real update time

  
  [1] 
https://opendev.org/openstack/neutron/src/commit/d253b9fd08b969ebab09a5624df127a4bf1bfb1f/neutron/plugins/ml2/drivers/ovn/agent/neutron_agent.py#L85

  stack@openstack:~$ openstack network agent show 
d02fc630-4ac8-466f-9795-38e8177cfc55
  
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Field             | Value                                                   
                                                                                
                                                 |
  
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | admin_state_up    | UP                                                      
                                                                                
                                                 |
  | agent_type        | OVN Controller Gateway agent                            
                                                                                
                                                 |
  | alive             | XXX                                                     
                                                                                
                                                 |
  | availability_zone |                                                         
                                                                                
                                                 |
  | binary            | ovn-controller                                          
                                                                                
                                                 |
  | configuration     | {'chassis_name': 
'd02fc630-4ac8-466f-9795-38e8177cfc55', 'bridge-mappings': 'public:br-ex'}      
                                                                                
        |
  | created_at        | None                                                    
                                                                                
                                                 |
  | description       |                                                         
                                                                                
                                                 |
  | ha_state          | None                                                    
                                                                                
                                                 |
  | host              | openstack                                               
                                                                                
                                                 |
  | id                | d02fc630-4ac8-466f-9795-38e8177cfc55                    
                                                                                
                                                 |
  | last_heartbeat_at | 2022-06-04 01:59:27.926511                              
                                                                                
                                                 |
  | location          | Munch({'cloud': '', 'region_name': 'RegionOne', 'zone': 
'', 'project': Munch({'id': '40e85036922248828c47cededb23036b', 'name': 
'admin', 'domain_id': 'default', 'domain_name': None})}) |
  | name              | None                                                    
                                                                                
                                                 |
  | resources_synced  | None                                                    
                                                                                
                                                 |
  | started_at        | None                                                    
                                                                                
                                                 |
  | topic             | n/a                                                     
                                                                                
                                                 |
  
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

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


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to