Public bug reported:

This API extension is implemented as ML2 plugin's extension but API
extension is added also to the _supported_extension_aliases list
directly in the ML2 plugin. Because of that even if ML2 extension is not
really loaded, this API extension is reported as available. Because of
that 'hardware_offload_type' attribute send from client is accepted by
neutron but it is not saved in the db at all:


$ openstack port create --network private --extra-property 
type=str,name=hardware_offload_type,value=switchdev test-port-hw-offload 


+-------------------------+-----------------------------------------------------------------------------------------------------+
                                                                                
                                                                                
                                                                                
             
| Field                   | Value                                               
                                                |                               
                                                                                
                                                                                
                                                              
+-------------------------+-----------------------------------------------------------------------------------------------------+
                                                                                
                                                                                
                                                                                
             
| admin_state_up          | UP                                                  
                                                |                               
                                                                                
                                                                                
                                                              
| allowed_address_pairs   |                                                     
                                                |                               
                                                                                
                                                                                
                                                              
| binding_host_id         |                                                     
                                                |                               
                                                                                
                                                                                
                                                              
| binding_profile         |                                                     
                                                |                               
                                                                                
                                                                                
                                                              
| binding_vif_details     |                                                     
                                                |                               
                                                                                
                                                                                
                                                              
| binding_vif_type        | unbound                                             
                                                |                               
                                                                                
                                                                                
                                                              
| binding_vnic_type       | normal                                              
                                                |                               
                                                                                
                                                                                
                                                              
| created_at              | 2024-08-30T09:15:55Z                                
                                                |                               
                                                                                
                                                                                
                                                              
| data_plane_status       | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| description             |                                                     
                                                |                               
                                                                                
                                                                                
                                                              
| device_id               |                                                     
                                                |                               
                                                                                
                                                                                
                                                              
| device_owner            |                                                     
                                                |                               
                                                                                
                                                                                
                                                              
| device_profile          | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| dns_assignment          | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| dns_domain              | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| dns_name                | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| extra_dhcp_opts         |                                                     
                                                |                               
                                                                                
                                                                                
                                                              
| fixed_ips               | ip_address='10.0.0.24', 
subnet_id='db04fa1c-0f8c-40fb-acb3-d49c9cbd35f1'                            |   
                                                                                
                                                                                
                                                                                
          
|                         | ip_address='fda7:c49d:c9ff:0:f816:3eff:fe82:da10', 
subnet_id='1447fb43-1f10-489c-8f4b-51fb094d43ff' |                              
                                                                                
                                                                                
                                                               
| hardware_offload_type   | switchdev                                           
                                                |                               
                                                                                
                                                                                
                                                              
| hints                   |                                                     
                                                |                               
                                                                                
                                                                                
                                                              
| id                      | dc002862-960b-49dd-b254-60e2d76497ae                
                                                |                               
                                                                                
                                                                                
                                                              
| ip_allocation           | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| mac_address             | fa:16:3e:82:da:10                                   
                                                |                               
                                                                                
                                                                                
                                                              
| name                    | test-port-hw-offload                                
                                                |                               
                                                                                
                                                                                
                                                              
| network_id              | 563778fd-5c44-4fed-9a42-332385baff90                
                                                |                               
                                                                                
                                                                                
                                                              
| numa_affinity_policy    | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| port_security_enabled   | True                                                
                                                |                               
                                                                                
                                                                                
                                                              
| project_id              | 89968c9415564ce38c19e2b06bfa216b                    
                                                |                               
                                                                                
                                                                                
                                                              
| propagate_uplink_status | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| resource_request        | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| revision_number         | 1                                                   
                                                |                               
                                                                                
                                                                                
                                                              
| qos_network_policy_id   | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| qos_policy_id           | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| security_group_ids      | 0ba13ab3-f5cf-41f6-bb3f-52955aa2d7ed                
                                                |                               
                                                                                
                                                                                
                                                              
| status                  | DOWN                                                
                                                |                               
                                                                                
                                                                                
                                                              
| tags                    |                                                     
                                                |                               
                                                                                
                                                                                
                                                              
| trunk_details           | None                                                
                                                |                               
                                                                                
                                                                                
                                                              
| updated_at              | 2024-08-30T09:15:55Z                                
                                                |                               
                                                                                
                                                                                
                                                              
+-------------------------+-----------------------------------------------------------------------------------------------------+

** Affects: neutron
     Importance: Low
     Assignee: Slawek Kaplonski (slaweq)
         Status: Confirmed


** Tags: api

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

Title:
  Port_hardware_offload_type API extension is reported as available but
  attribute is not set for ports

Status in neutron:
  Confirmed

Bug description:
  This API extension is implemented as ML2 plugin's extension but API
  extension is added also to the _supported_extension_aliases list
  directly in the ML2 plugin. Because of that even if ML2 extension is
  not really loaded, this API extension is reported as available.
  Because of that 'hardware_offload_type' attribute send from client is
  accepted by neutron but it is not saved in the db at all:

  
  $ openstack port create --network private --extra-property 
type=str,name=hardware_offload_type,value=switchdev test-port-hw-offload 

  
  
+-------------------------+-----------------------------------------------------------------------------------------------------+
                                                                                
                                                                                
                                                                                
             
  | Field                   | Value                                             
                                                  |                             
                                                                                
                                                                                
                                                                
  
+-------------------------+-----------------------------------------------------------------------------------------------------+
                                                                                
                                                                                
                                                                                
             
  | admin_state_up          | UP                                                
                                                  |                             
                                                                                
                                                                                
                                                                
  | allowed_address_pairs   |                                                   
                                                  |                             
                                                                                
                                                                                
                                                                
  | binding_host_id         |                                                   
                                                  |                             
                                                                                
                                                                                
                                                                
  | binding_profile         |                                                   
                                                  |                             
                                                                                
                                                                                
                                                                
  | binding_vif_details     |                                                   
                                                  |                             
                                                                                
                                                                                
                                                                
  | binding_vif_type        | unbound                                           
                                                  |                             
                                                                                
                                                                                
                                                                
  | binding_vnic_type       | normal                                            
                                                  |                             
                                                                                
                                                                                
                                                                
  | created_at              | 2024-08-30T09:15:55Z                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | data_plane_status       | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | description             |                                                   
                                                  |                             
                                                                                
                                                                                
                                                                
  | device_id               |                                                   
                                                  |                             
                                                                                
                                                                                
                                                                
  | device_owner            |                                                   
                                                  |                             
                                                                                
                                                                                
                                                                
  | device_profile          | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | dns_assignment          | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | dns_domain              | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | dns_name                | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | extra_dhcp_opts         |                                                   
                                                  |                             
                                                                                
                                                                                
                                                                
  | fixed_ips               | ip_address='10.0.0.24', 
subnet_id='db04fa1c-0f8c-40fb-acb3-d49c9cbd35f1'                            |   
                                                                                
                                                                                
                                                                                
          
  |                         | 
ip_address='fda7:c49d:c9ff:0:f816:3eff:fe82:da10', 
subnet_id='1447fb43-1f10-489c-8f4b-51fb094d43ff' |                              
                                                                                
                                                                                
                                                               
  | hardware_offload_type   | switchdev                                         
                                                  |                             
                                                                                
                                                                                
                                                                
  | hints                   |                                                   
                                                  |                             
                                                                                
                                                                                
                                                                
  | id                      | dc002862-960b-49dd-b254-60e2d76497ae              
                                                  |                             
                                                                                
                                                                                
                                                                
  | ip_allocation           | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | mac_address             | fa:16:3e:82:da:10                                 
                                                  |                             
                                                                                
                                                                                
                                                                
  | name                    | test-port-hw-offload                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | network_id              | 563778fd-5c44-4fed-9a42-332385baff90              
                                                  |                             
                                                                                
                                                                                
                                                                
  | numa_affinity_policy    | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | port_security_enabled   | True                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | project_id              | 89968c9415564ce38c19e2b06bfa216b                  
                                                  |                             
                                                                                
                                                                                
                                                                
  | propagate_uplink_status | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | resource_request        | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | revision_number         | 1                                                 
                                                  |                             
                                                                                
                                                                                
                                                                
  | qos_network_policy_id   | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | qos_policy_id           | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | security_group_ids      | 0ba13ab3-f5cf-41f6-bb3f-52955aa2d7ed              
                                                  |                             
                                                                                
                                                                                
                                                                
  | status                  | DOWN                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | tags                    |                                                   
                                                  |                             
                                                                                
                                                                                
                                                                
  | trunk_details           | None                                              
                                                  |                             
                                                                                
                                                                                
                                                                
  | updated_at              | 2024-08-30T09:15:55Z                              
                                                  |                             
                                                                                
                                                                                
                                                                
  
+-------------------------+-----------------------------------------------------------------------------------------------------+

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


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to