You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/12/07 22:07:31 UTC

[GitHub] [cloudstack] richardlawley opened a new pull request #3313: Simulator: Better VR Redundant Status Behaviour

richardlawley opened a new pull request #3313: Simulator: Better VR Redundant Status Behaviour
URL: https://github.com/apache/cloudstack/pull/3313
 
 
   ## Description
   <!--- Describe your changes in detail -->
   Before this change, when creating a HA network in the Simulator, both Routers would be in BACKUP mode.  Many years ago in f0c3b4c62a7a1a440d723696d61b42dad58f6faf, logic was added to allow the line "router_pr=100" to be added to the bootargs field of mockvm in the Simulator database to allow a VR to become MASTER.  This doesn't work automatically (nowhere sets it) and actually fails because the field is too short, and no other statuses can be simulated.
   
   With this PR, Redundant State now comes from the "redundate_state=MASTER" part in bootargs, which is already populated.  
   
   Additionally, the Start/Reboot/Stop VM code of the simulator now incldues logic to change the redundant state:
     * When Starting a VR, if no other VRs are Running and MASTER on this network, become MASTER
     * When Stopping a VR, if we are MASTER become BACKUP.  If another VR is running and BACKUP, make it MASTER.
     * When Rebooting a VR, combine this logic (Stop/Start)
   
   This will allow integration tests to easily change the state of a VR.
   
   With this PR, the simulator will change the redundant state of a VR when it is started or stopped.  When a VR is started, if there are no other running VRs that are MASTER then 
   
   <!-- 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: # -->
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] 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)
   
   ## 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. -->
   * Deploy Simulator with advanced config
   * Create & Enable HA Network Offering
   * Deploy Network and a VM, check Network > Virtual Appliances page and observe that 2 VRs are present, one MASTER and the other BACKUP
   * Stop MASTER VR.  Observe that other VR becomes MASTER
   * Stop other VR.  Both will internally become BACKUP, but this isn't displayed when VRs are stopped
   * Start original VR.  Observe that it becomes MASTER
   * Start second VR.  Observe that it becomes BACKUP
   * Reboot MASTER VR.  Observe that the states swap.
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services