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


   ### Description
   
   This PR is a GSoC project: https://github.com/apache/cloudstack/issues/4814
   
   This PR adds a feature to L2 persitent networks, where resources of the 
persistent networks are created at hostConnect phase of DefaultHostListener, 
and cleaned up at hostAboutToBeRemoved phase.
   
   This PR also fixes a bug, where rebooting the hosts removes the persistent 
network's resources, without readding them when the host is readded to the zone.
   
   Continuation of PR: https://github.com/apache/cloudstack/pull/5195
   Fixes: https://github.com/apache/cloudstack/issues/5196
   <!--- 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)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [X] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [X] Minor
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   This has been manually tested with a mbx KVM, XenServer and VmWare setup on 
a local machine. 
   
   Different manual test scenarios:
   1. When the persistent network is created and the host is added afterwards, 
the newly added host has the persistent network's resources.
   2. When a host within a zone with a persistent network is removed from the 
zone, its resources will be cleaned up.
   3. When a host with a running VM is removed from the zone, the running VM 
will migrate before the resources are cleaned up.
   4. When a host is rebooted, it still has access to the persistent network's 
resources.
   
   A Marvin component test under 
   test/integration/component/test_persistent_networks.py
   added that tests the following steps for a KVM environment.
   1. identify hosts in the zone, and remove the first
   2. create a L2 persistent network
   3. add the host back to the zone
   
   Validation steps:
   1. Persistent network state should be implemented before adding the host
   2. Host should be added back in successfully
   3. Host should have the persistent networks resources after being added
   <!-- 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. -->
   
   Test output results should be:
   
   ==== Marvin Init Started ====
   
   === Marvin Parse Config Successful ===
   
   === Marvin Setting TestData Successful===
   
   ==== Log Folder Path: /tmp/MarvinLogs/<LogId>. All logs will be available 
here ====
   
   === Marvin Init Logging Successful===
   
   ==== Marvin Init Successful ====
   ====Trying SSH Connection: Host:172.20.0.121 User:root                       
            Port:22 RetryCnt:10===
   ===SSH to Host 172.20.0.121 port : 22 SUCCESSFUL===
   {Cmd: ip addr | grep breth0-991 > /dev/null 2>&1; echo $? via Host: 
172.20.0.121} {returns: ['0']}
   === TestName: test_newly_added_host_for_persistent_network_resources | 
Status : SUCCESS ===
   
   ===final results are now copied to: 
/tmp//MarvinLogs/test_persistent_networks_<LogId>===
   
   
   <!-- 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