dhslove opened a new pull request, #5862: URL: https://github.com/apache/cloudstack/pull/5862
### Description This PR includes the features to provide high availability using Ceph RBD-based Primary Storage. The KVM Host HA feature uses NFS Primary Storage. However, an additional storage consideration in KVM is Ceph RBD. This PR considers the following two to provide HA using RBD. 1. Must use the multi-monitor server feature of Ceph RBD. 2. The RBD-based HA function should be provided in the same way as the NFS-based HA. This PR includes the feature to enter multiple monitor addresses separated by commas in the RADOS Monitor item when registering RBD Primary Storage. And it includes adding code to provide HA based on RBD Primary Storage. To support RBD-based HA, add RBDStoragePool class to KVMHABase and use it to perform heartbeat check and activity check in the same way as NFS. Similar to how NFS writes hb and ac files to a KVMHA directory, RADOS commands are used to put hb and ac files into the RBD pool registered as primary storage. To perform this heartbeat and activity check, kvmheartbeat_rbd.sh and kvmvmactivity_rbd.sh files were added. This is to clearly distinguish roles from the same shell file for nfs. This PR is necessary to support agent-free HA based on Ceph RBD like NFS, even if the related PR #4978 is merged. The execution result of the function can be checked in the attached image. <!--- 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 - [x] Major - [ ] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [ ] 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. --> <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document --> RBD Multiple Monitor Support - Add RBD Primary Storage  RBD Multiple Monitor Support - RBD Primary Storage List  RBD Multiple Monitor Support - KVM Host Secret List  RBD Multiple Monitor Support - VM Disk XML(Multi RBD Monitor)  RBD Based KVM Host HA - One of Hosts Off  RBD Based KVM Host HA - Host Suspect State  RBD Based KVM Host HA - Host Down State  -- 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]
