From 6b3f2ff94df327038a6a3323db787c08c40cbfa5 Mon Sep 17 00:00:00 2001 From: Bence Romsics Date: Fri, 26 Apr 2019 14:28:40 +0200 Subject: [PATCH] Atomic ExtraRoute Resource Start using Neutron's extraroute-atomic API to make OS::Neutron::ExtraRoute free of lost updates because of concurrency problems. Change-Id: Ie9f6f47f17befd6a4e79e02e9f10b192927b6bd2 Story: #2005522 Task: #30641 --- specs/train/atomic-extraroute.rst | 109 ++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 specs/train/atomic-extraroute.rst diff --git a/specs/train/atomic-extraroute.rst b/specs/train/atomic-extraroute.rst new file mode 100644 index 00000000..9df9a58b --- /dev/null +++ b/specs/train/atomic-extraroute.rst @@ -0,0 +1,109 @@ +.. + This work is licensed under a Creative Commons Attribution 3.0 Unported + License. + + http://creativecommons.org/licenses/by/3.0/legalcode + +========================== +Atomic ExtraRoute Resource +========================== + +https://storyboard.openstack.org/#!/story/2005522 + +As we improve Neutron's extraroute API we could adapt Heat's +OS::Neutron::ExtraRoute resource to use the improved API and via that +turn the resource to a supported resource. + +Problem description +=================== + +As discussed in an `openstack-discuss thread +`_ +we could improve the Neutron's extraroute API to better support Neutron +API clients, especially Heat. + +The problem is that the current extraroute API does not allow atomic +additions/deletions of particular routing table entries. In the current +API the routes attribute of a router (containing all routing table +entries) must be updated at once. Therefore additions and deletions +must be performed on the client side. Therefore multiple clients race +to update the routes attribute and updates may get lost. + +Proposed change +=============== + +Change OS::Neutron::ExtraRoute to use the new Neutron API (extension +extraroute-atomic) as it is specified in the `Atomic Extraroute API +Neutron RFE `_. + +Keep the resource template format as it is today, that is: + +:: + + extraroute0: + type: OS::Neutron::ExtraRoute + properties: + destination: 10.1.0.0/24 + nexthop: 10.0.0.10 + router_id: { get_resource: router0 } + +Unit test and document the change. + +Change the resource's support_status to SUPPORTED. + +Alternatives +------------ + +We could introduce a OS::Neutron::ExtraRoutes resource (please note the +plural). Internally the the resource implementation would still use the +improved Neutron extraroute-atomic API. But the template syntax could allow +multiple routes in one resource; + +:: + + extraroute1: + type: OS::Neutron::ExtraRoutes + properties: + router_id: { get_resource: router0 } + routes: + - destination: 10.1.0.0/24 + nexthop: 10.0.0.10 + +This format could allow more efficient use of the Neutron API. But it would +be backwards incompatible with the previous unsupported +OS::Neutron::ExtraRoute resource. + +Even if going with the proposed template syntax we may want to introduce a +new resource name to express the difference in behavior, for example: +OS::Neutron::AtomicExtraRoute. + +Implementation +============== + +Assignee(s) +----------- + +Primary assignee: Bence Romsics + +Milestones +---------- + +Target Milestone for completion: Not known yet, please see Dependencies +(but I hope to complete the whole Neutron+Heat feature in the Train cycle, +so either milestone 2 or 3 for Heat). + +Work Items +---------- + +* Change the resource implementation. +* Unit test the resource implementation. +* Document the change. + +Dependencies +============ + +The completion of the Neutron API change is a pre-requisite to the proposed +Heat change. The proposed Neutron change is also under review at the time of +first publishing this spec. This spec may or may not need an update after the +Neutron spec is merged. All cross-project spec review is warmly welcome so +we can create a Neutron API that's easy to consume from Heat.