← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1981817] [NEW] neutron revision_number does not bump on network update

 

Public bug reported:

neutron revision_number does not bump on network update

I tested the exact same mechanism with the subnet resource and an update
to the same field (description) and it works like a charm. For the
network resource, the revision number is not updated when updating the
port, instead there's an inconsitency checker which fixesthe
inconsistency from time to time

Here's the output of my go application calling into the API and updating resources (with a slightly modified version of gophercloud):
~~~
[stack@standalone gophercloud-test]$ go run main.go -network-id 674bf675-0382-4524-86f6-be1b677e1c12 -subnet-id 10ee214c-e8df-4f1a-af0b-4c9b64db64e3 -port-id c808500a-70b8-45e8-b0df-cbf0336d3139
I0715 13:06:18.881525  561527 main.go:101] Getting network
================> akaris GET  map[network:map[admin_state_up:true availability_zone_hints:[] availability_zones:[] created_at:2022-07-15T11:15:29Z description: dns_domain: id:674bf675-0382-4524-86f6-be1b677e1c12 ipv4_address_scope:<nil> ipv6_address_scope:<nil> l2_adjacency:true mtu:1442 name:akaris-test port_security_enabled:true project_id:6f69c87fe95b469c8c7709382818acf6 qos_policy_id:<nil> revision_number:40 router:external:false shared:false status:ACTIVE subnets:[10ee214c-e8df-4f1a-af0b-4c9b64db64e3] tags:[] tenant_id:6f69c87fe95b469c8c7709382818acf6 updated_at:2022-07-15T13:04:20Z]]
I0715 13:06:19.063586  561527 main.go:103] Revision number is: 40
I0715 13:06:21.063986  561527 main.go:107] Updating network
-----> akaris PUT https://10.1.8.109:13696/v2.0/networks/674bf675-0382-4524-86f6-be1b677e1c12 &{map[network:map[description:test]] <nil> 0xc0005f6b10 [200 201] map[If-Match:revision_number=40] [] <nil> false}
I0715 13:06:25.666203  561527 main.go:124] Updating network again
I0715 13:06:25.666231  561527 main.go:130] Revision number is: 40
-----> akaris PUT https://10.1.8.109:13696/v2.0/networks/674bf675-0382-4524-86f6-be1b677e1c12 &{map[network:map[description:test2]] <nil> 0xc000615a70 [200 201] map[If-Match:revision_number=40] [] <nil> false}
================> akaris GET  map[network:map[admin_state_up:true availability_zone_hints:[] availability_zones:[] created_at:2022-07-15T11:15:29Z description:test2 dns_domain: id:674bf675-0382-4524-86f6-be1b677e1c12 ipv4_address_scope:<nil> ipv6_address_scope:<nil> l2_adjacency:true mtu:1442 name:akaris-test port_security_enabled:true project_id:6f69c87fe95b469c8c7709382818acf6 qos_policy_id:<nil> revision_number:40 router:external:false shared:false status:ACTIVE subnets:[10ee214c-e8df-4f1a-af0b-4c9b64db64e3] tags:[] tenant_id:6f69c87fe95b469c8c7709382818acf6 updated_at:2022-07-15T13:06:25Z]]
I0715 13:06:28.093811  561527 main.go:138] &{674bf675-0382-4524-86f6-be1b677e1c12 akaris-test test2 true ACTIVE [10ee214c-e8df-4f1a-af0b-4c9b64db64e3] 6f69c87fe95b469c8c7709382818acf6 2022-07-15 13:06:25 +0000 UTC 2022-07-15 11:15:29 +0000 UTC 6f69c87fe95b469c8c7709382818acf6 false [] [] 40}
I0715 13:06:30.094846  561527 main.go:142] Getting network
================> akaris GET  map[network:map[admin_state_up:true availability_zone_hints:[] availability_zones:[] created_at:2022-07-15T11:15:29Z description:test2 dns_domain: id:674bf675-0382-4524-86f6-be1b677e1c12 ipv4_address_scope:<nil> ipv6_address_scope:<nil> l2_adjacency:true mtu:1442 name:akaris-test port_security_enabled:true project_id:6f69c87fe95b469c8c7709382818acf6 qos_policy_id:<nil> revision_number:40 router:external:false shared:false status:ACTIVE subnets:[10ee214c-e8df-4f1a-af0b-4c9b64db64e3] tags:[] tenant_id:6f69c87fe95b469c8c7709382818acf6 updated_at:2022-07-15T13:06:25Z]]
I0715 13:06:30.210418  561527 main.go:144] Revision number is: 40
I0715 13:06:32.211495  561527 main.go:148] Resetting network
-----> akaris PUT https://10.1.8.109:13696/v2.0/networks/674bf675-0382-4524-86f6-be1b677e1c12 &{map[network:map[description:]] <nil> 0xc0005f62a0 [200 201] map[If-Match:revision_number=40] [] <nil> false}
~~~

Here's the neutron output for that same test:
~~~
  stack@standalone gophercloud]$ while true; do date ; openstack network show 674bf675-0382-4524-86f6-be1b677e1c12 ; sleep 1; done
  Fri Jul 15 13:06:15 UTC 2022
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Field                     | Value                                                                                                                                                                                    |
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | description               |                                                                                                                                                                                          |   
  | revision_number           | 40                                                                                                                                                                                       |   
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  Fri Jul 15 13:06:18 UTC 2022
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Field                     | Value                                                                                                                                                                                    |   
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | description               |                                                                                                                                                                                          |   
  | revision_number           | 40                                                                                                                                                                                       |   
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  Fri Jul 15 13:06:22 UTC 2022
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Field                     | Value                                                                                                                                                                                    |   
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | description               | test                                                                                                                                                                                     |   
  | revision_number           | 40                                                                                                                                                                                       |   
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  Fri Jul 15 13:06:25 UTC 2022
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Field                     | Value                                                                                                                                                                                    |   
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | description               | test2                                                                                                                                                                                    |   
  | revision_number           | 40                                                                                                                                                                                       |   
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  Fri Jul 15 13:06:29 UTC 2022
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Field                     | Value                                                                                                                                                                                    |   
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | description               | test2                                                                                                                                                                                    |   
  | revision_number           | 40                                                                                                                                                                                       |   
  +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
~~~

** Affects: neutron
     Importance: Undecided
         Status: New

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

Title:
  neutron revision_number does not bump on network update

Status in neutron:
  New

Bug description:
  neutron revision_number does not bump on network update

  I tested the exact same mechanism with the subnet resource and an
  update to the same field (description) and it works like a charm. For
  the network resource, the revision number is not updated when updating
  the port, instead there's an inconsitency checker which fixesthe
  inconsistency from time to time

  Here's the output of my go application calling into the API and updating resources (with a slightly modified version of gophercloud):
  ~~~
  [stack@standalone gophercloud-test]$ go run main.go -network-id 674bf675-0382-4524-86f6-be1b677e1c12 -subnet-id 10ee214c-e8df-4f1a-af0b-4c9b64db64e3 -port-id c808500a-70b8-45e8-b0df-cbf0336d3139
  I0715 13:06:18.881525  561527 main.go:101] Getting network
  ================> akaris GET  map[network:map[admin_state_up:true availability_zone_hints:[] availability_zones:[] created_at:2022-07-15T11:15:29Z description: dns_domain: id:674bf675-0382-4524-86f6-be1b677e1c12 ipv4_address_scope:<nil> ipv6_address_scope:<nil> l2_adjacency:true mtu:1442 name:akaris-test port_security_enabled:true project_id:6f69c87fe95b469c8c7709382818acf6 qos_policy_id:<nil> revision_number:40 router:external:false shared:false status:ACTIVE subnets:[10ee214c-e8df-4f1a-af0b-4c9b64db64e3] tags:[] tenant_id:6f69c87fe95b469c8c7709382818acf6 updated_at:2022-07-15T13:04:20Z]]
  I0715 13:06:19.063586  561527 main.go:103] Revision number is: 40
  I0715 13:06:21.063986  561527 main.go:107] Updating network
  -----> akaris PUT https://10.1.8.109:13696/v2.0/networks/674bf675-0382-4524-86f6-be1b677e1c12 &{map[network:map[description:test]] <nil> 0xc0005f6b10 [200 201] map[If-Match:revision_number=40] [] <nil> false}
  I0715 13:06:25.666203  561527 main.go:124] Updating network again
  I0715 13:06:25.666231  561527 main.go:130] Revision number is: 40
  -----> akaris PUT https://10.1.8.109:13696/v2.0/networks/674bf675-0382-4524-86f6-be1b677e1c12 &{map[network:map[description:test2]] <nil> 0xc000615a70 [200 201] map[If-Match:revision_number=40] [] <nil> false}
  ================> akaris GET  map[network:map[admin_state_up:true availability_zone_hints:[] availability_zones:[] created_at:2022-07-15T11:15:29Z description:test2 dns_domain: id:674bf675-0382-4524-86f6-be1b677e1c12 ipv4_address_scope:<nil> ipv6_address_scope:<nil> l2_adjacency:true mtu:1442 name:akaris-test port_security_enabled:true project_id:6f69c87fe95b469c8c7709382818acf6 qos_policy_id:<nil> revision_number:40 router:external:false shared:false status:ACTIVE subnets:[10ee214c-e8df-4f1a-af0b-4c9b64db64e3] tags:[] tenant_id:6f69c87fe95b469c8c7709382818acf6 updated_at:2022-07-15T13:06:25Z]]
  I0715 13:06:28.093811  561527 main.go:138] &{674bf675-0382-4524-86f6-be1b677e1c12 akaris-test test2 true ACTIVE [10ee214c-e8df-4f1a-af0b-4c9b64db64e3] 6f69c87fe95b469c8c7709382818acf6 2022-07-15 13:06:25 +0000 UTC 2022-07-15 11:15:29 +0000 UTC 6f69c87fe95b469c8c7709382818acf6 false [] [] 40}
  I0715 13:06:30.094846  561527 main.go:142] Getting network
  ================> akaris GET  map[network:map[admin_state_up:true availability_zone_hints:[] availability_zones:[] created_at:2022-07-15T11:15:29Z description:test2 dns_domain: id:674bf675-0382-4524-86f6-be1b677e1c12 ipv4_address_scope:<nil> ipv6_address_scope:<nil> l2_adjacency:true mtu:1442 name:akaris-test port_security_enabled:true project_id:6f69c87fe95b469c8c7709382818acf6 qos_policy_id:<nil> revision_number:40 router:external:false shared:false status:ACTIVE subnets:[10ee214c-e8df-4f1a-af0b-4c9b64db64e3] tags:[] tenant_id:6f69c87fe95b469c8c7709382818acf6 updated_at:2022-07-15T13:06:25Z]]
  I0715 13:06:30.210418  561527 main.go:144] Revision number is: 40
  I0715 13:06:32.211495  561527 main.go:148] Resetting network
  -----> akaris PUT https://10.1.8.109:13696/v2.0/networks/674bf675-0382-4524-86f6-be1b677e1c12 &{map[network:map[description:]] <nil> 0xc0005f62a0 [200 201] map[If-Match:revision_number=40] [] <nil> false}
  ~~~

  Here's the neutron output for that same test:
  ~~~
    stack@standalone gophercloud]$ while true; do date ; openstack network show 674bf675-0382-4524-86f6-be1b677e1c12 ; sleep 1; done
    Fri Jul 15 13:06:15 UTC 2022
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Field                     | Value                                                                                                                                                                                    |
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | description               |                                                                                                                                                                                          |   
    | revision_number           | 40                                                                                                                                                                                       |   
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    Fri Jul 15 13:06:18 UTC 2022
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Field                     | Value                                                                                                                                                                                    |   
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | description               |                                                                                                                                                                                          |   
    | revision_number           | 40                                                                                                                                                                                       |   
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    Fri Jul 15 13:06:22 UTC 2022
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Field                     | Value                                                                                                                                                                                    |   
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | description               | test                                                                                                                                                                                     |   
    | revision_number           | 40                                                                                                                                                                                       |   
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    Fri Jul 15 13:06:25 UTC 2022
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Field                     | Value                                                                                                                                                                                    |   
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | description               | test2                                                                                                                                                                                    |   
    | revision_number           | 40                                                                                                                                                                                       |   
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    Fri Jul 15 13:06:29 UTC 2022
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Field                     | Value                                                                                                                                                                                    |   
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | description               | test2                                                                                                                                                                                    |   
    | revision_number           | 40                                                                                                                                                                                       |   
    +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  ~~~

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



Follow ups