Pearl1594 opened a new pull request #5985:
URL: https://github.com/apache/cloudstack/pull/5985


   ### Description
   
   This PR fixes https://github.com/apache/cloudstack/issues/5934
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally 
changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to 
reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be 
closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- 
*********************************************************************************
 -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE 
DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- 
*********************************************************************************
 -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   <!-- see how your change affects other areas of the code, etc. -->
   (1) create isolated network
   (2) add new public IP range
   (3) acquire public IP in new IP range
   (4) create firewall rule. a new NIC is added to the network VR
   (5) release the public IP. - if it is the only IP on the NIC, the nic will 
be removed
   
   Test 1:
   Initial output of `ip a` with default NIC:
   
![image](https://user-images.githubusercontent.com/10495417/153587069-312dd496-7d69-46bc-b826-c3a97375b240.png)
   
   Acquired an IP in another Public IP range and added a firewall rule: New nic 
was added
   
![image](https://user-images.githubusercontent.com/10495417/153587236-c9f292f3-f23f-4525-87d0-0afc1610d362.png)
   
   On deletion of the firewall rule on the NIC, the nic is removed:
   
![image](https://user-images.githubusercontent.com/10495417/153590796-7d564ee2-a805-48fe-8a7b-5be9bbcd5d37.png)
   
   Test2:
   
   Add another Public IP range in the same VLAN as the one before 
   Acquire & add firewall rule for 2 IPs belonging to 2 different Public IP 
ranges but the same VLAN, such that there are 2 IPs on a NIC (check eth3)
   
![image](https://user-images.githubusercontent.com/10495417/153591161-bc41c7b2-ed9f-4825-bc13-8e00ff647036.png)
   
   Remove the rule from one of the IPs, and verify that the IP is disassociated 
from the VRs NIC, but the NIC isn't removed:
   
![image](https://user-images.githubusercontent.com/10495417/153591310-d5083115-00cc-4f6c-b42f-8de50d957f9e.png)
   
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to