Bug 1729746 - transactions: failing to create subnets can lead to left-overs
Summary: transactions: failing to create subnets can lead to left-overs
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: ovirt-provider-ovn
Classification: oVirt
Component: provider
Version: 1.2.22
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-14 06:20 UTC by Miguel Duarte Barroso
Modified: 2022-01-18 12:18 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-10-20 08:09:04 UTC
oVirt Team: Network
Embargoed:


Attachments (Terms of Use)

Description Miguel Duarte Barroso 2019-07-14 06:20:08 UTC
Description of problem:
Creating a subnet requires multiple transactions:
  - 1 for updating the network object
  - 1 for creating the dhcp options object
  - 1 for updating the dhcp object options
  - 1 per each existent logical network port existent in the network

Since it is not done via a transaction (a mechanism that is now available on the provider code base), failing to create a subnet can leave leftovers behind (e.g. when it fails for one of the ports; the logical switch object is updated, the dhcp option object is created, the dhcp object is updated, and X ports are updated).

Using the transaction mechanism is a lot safer, since it assures either everything goes according to plan, or nothing does, enabling the system to be more scalable / deterministic.  

Version-Release number of selected component (if applicable):
1.2.22

How reproducible:
always

Steps to Reproduce:
1. create a logical switch
2. create some 10 ports on that logical switch (the more the easier it is to reproduce)
3. create a subnet on top of the network object
4. interrupt the REST client before receiving a response from the provider

Actual results:
Some of the ports will not have been updated - missing IP addresses

Expected results:
Either all ports are updated (create subnet succeeded), or none are (create subnet failed).

Comment 1 Ales Musil 2021-10-20 08:09:04 UTC
The fix would be complicated and there is not enough resources to do it.


Note You need to log in before you can comment on or make changes to this bug.