Bug #4492
Duplicated security group rules in deployed VM template
Status: | Closed | Start date: | 05/27/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Ruben S. Montero | % Done: | 0% | |
Category: | Core & System | |||
Target version: | Release 5.0 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: | Development |
Description
When attaching and detaching a NIC to a VM multiple times, the same security groups are being added multiple times in the template of the VM.
Associated revisions
bug #4492: Remove uneeded Security Groups from VM when detaching a NIC
History
#1 Updated by Ruben S. Montero about 5 years ago
- Category set to Core & System
- Target version set to Release 5.0
#2 Updated by Ruben S. Montero about 5 years ago
- Assignee set to Ruben S. Montero
#3 Updated by Ruben S. Montero about 5 years ago
Hi
I cannot replicate this one. My test:
- create VM
- Attach NIC, pick security group 102
- Attach NIC, pick security group 102
The rules of 102 only appears once. Note that if the same rule appears in two security groups it will be added. This is the expected behavior.
#4 Updated by Ruben S. Montero about 5 years ago
BTW, just if this gives information on how to reproduce:
https://github.com/OpenNebula/one/blob/master/src/vm/VirtualMachine.cc#L2725
This loop removes the existing SGs from NIC to prevent duplicates...
#5 Updated by Guillaume Oberlé about 5 years ago
- File Screen Shot 2016-06-01 at 18.57.29.png added
- File Screen Shot 2016-06-01 at 19.01.18.png added
- create VM
- attach NIC, pick security group X
- detach that NIC
- re-attach same NIC with security group X
I end up with 4 security rules (instead of 2) in the template of the VM, please find attached two screenshots.
#6 Updated by Guillaume Oberlé about 5 years ago
- File Screen Shot 2016-06-01 at 19.05.26.png added
Also attaching the security group rules.
#7 Updated by Ruben S. Montero about 5 years ago
- Status changed from Pending to Closed
- Resolution set to fixed
OK! This is now fixed. The problem was in the detach operation not removing the unused Security Groups.
#8 Updated by Guillaume Oberlé about 5 years ago
Great, thanks ! :)