Reviewed: https://review.opendev.org/c/openstack/neutron/+/851733 Committed: https://opendev.org/openstack/neutron/commit/4c9cb83d6b46a6425e603194649a61f51a07a307 Submitter: "Zuul (22348)" Branch: master
commit 4c9cb83d6b46a6425e603194649a61f51a07a307 Author: Slawek Kaplonski <[email protected]> Date: Mon Aug 1 13:00:28 2022 +0200 Bump revision number of objects when description is changed "Description" attribute belongs to the StandardAttribute class from which many other classes inherits (like e.g. Network, Port or Subnet). In case when only description of object is updated, revision number of the object should be bumped but it wasn't the case for all of the objects. For example updated description of the Network or Router didn't bumped its revision_number. It was like that because StandardAttribute object was the only one which was dirty in the session, and as it is not member of the HasStandardAttibutes class, it was filtered out. Now, to fix that problem revision_plugin looks in the session.dirty list for objects which inherits from HasStandardAttibutes class (as it was before) but also for StandardAttribute objects to bump revision numbers. Closes-Bug: #1981817 Closes-Bug: #1865173 Change-Id: I79b40a8ae5d594ed6fc875572663469c8b701202 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1865173 Title: Revision number not bumped after update of router's description Status in neutron: Fix Released Bug description: When router's description is updated, it's revision number isn't bumped: [16:23:20] vagrant@devstack-ubuntu-ovs:~$ neutron router-show router1-updated neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | False | | availability_zone_hints | | | availability_zones | nova | | created_at | 2020-02-05T11:15:42Z | | description | Test 3 | | distributed | False | | external_gateway_info | {"network_id": "b5623d28-a48e-4fca-a4bc-8490e35b8b99", "external_fixed_ips": [{"subnet_id": "6e83aac3-3fd1-4b22-bcaf-64a20e047c68", "ip_address": "10.10.0.130"}, {"subnet_id": "19192cb1-ab0a-4b6d-ac69-51cd5f2183d4", "ip_address": "2001:db8::3cc"}], "enable_snat": true} | | flavor_id | | | ha | False | | id | 07ee9def-6cf7-4dce-b898-014924c43c88 | | name | router1-updated | | project_id | 7436d2571300417f97abf1dc232fbf20 | | revision_number | 9 | | routes | | | status | ACTIVE | | tags | | | tenant_id | 7436d2571300417f97abf1dc232fbf20 | | updated_at | 2020-02-27T15:23:20Z | +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ [16:23:25] vagrant@devstack-ubuntu-ovs:~$ neutron router-update router1-updated --description "Test revision 1" neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Updated router: router1-updated [16:23:47] vagrant@devstack-ubuntu-ovs:~$ neutron router-show router1-updated neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | False | | availability_zone_hints | | | availability_zones | nova | | created_at | 2020-02-05T11:15:42Z | | description | Test revision 1 | | distributed | False | | external_gateway_info | {"network_id": "b5623d28-a48e-4fca-a4bc-8490e35b8b99", "external_fixed_ips": [{"subnet_id": "6e83aac3-3fd1-4b22-bcaf-64a20e047c68", "ip_address": "10.10.0.130"}, {"subnet_id": "19192cb1-ab0a-4b6d-ac69-51cd5f2183d4", "ip_address": "2001:db8::3cc"}], "enable_snat": true} | | flavor_id | | | ha | False | | id | 07ee9def-6cf7-4dce-b898-014924c43c88 | | name | router1-updated | | project_id | 7436d2571300417f97abf1dc232fbf20 | | revision_number | 9 | | routes | | | status | ACTIVE | | tags | | | tenant_id | 7436d2571300417f97abf1dc232fbf20 | | updated_at | 2020-02-27T15:23:46Z | +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ But when I updated e.g. router's name or admin_state, revision number was updated properly. Also when I updated description of e.g. port or floating ip revision number was bumped properly. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1865173/+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

