one icon indicating copy to clipboard operation
one copied to clipboard

Transactional VR Operations

Open vholer opened this issue 5 years ago • 0 comments

Description

Virtual Router actions across the groups of VMs are not transactional, i.e. if anything fails on a single VM, the state is not rollbacked, but left in inconsintent state.

For example, have a VR with 2 VMs:

  • you attach NIC into the VR, but it fails on one VM:
$ onevrouter nic-attach 10 --network 2
[one.vrouter.attachnic] Could not add a new NIC to VM 84, wrong state PENDING.
  • NIC is attached to VR:
VIRTUAL ROUTER NICS                                                             
 ID NETWORK              MANAGEMENT IP             
  0 service              NO         -
  1 service-reserved     NO         -
  • NIC is attached to VM1 (ID 83):
VM NICS                                                                         
 ID NETWORK              BRIDGE       IP              MAC               PCI_ID  
  0 service              br0          192.168.2.16    02:00:c0:a8:02:10
  1 service-reserved     br0          192.168.2.2     02:00:c0:a8:02:02
  • but, NIC is not attached to VM2 (ID 84)
NIC_ID NETWORK                   SECURITY_GROUPS                                
     0 service                   0

To Reproduce Attach NIC to VR, while one of the VMs is in transitional state.

Expected behavior On failure, the changes are reverted to the original state.

I.e., in the example above, the NIC is detached from VM1 and VR.

Details

  • Affected Component: oned
  • Version: 5.12.6

Progress Status

  • [ ] Branch created
  • [ ] Code committed to development branch
  • [ ] Testing - QA
  • [ ] Documentation
  • [ ] Release notes - resolved issues, compatibility, known issues
  • [ ] Code committed to upstream release/hotfix branches
  • [ ] Documentation committed to upstream release/hotfix branches

vholer avatar Nov 09 '20 14:11 vholer