skattoju4 opened a new pull request #3794: URL: https://github.com/apache/cloudstack/pull/3794
## Description Previously, volume access groups were assigned with the convention Cloudstack-RandomUUID. This change proposes that that we use Cloudstack-clusterUuId instead. The problem addressed by this PR is that under some conditions multiple volume access groups with random uuids are created. This is illustrated in the screenshot below: ![image](https://user-images.githubusercontent.com/45833770/73491211-14ab5580-437c-11ea-9518-c2f335e11833.png) One of the scenarios in which this occurs is when upgrades are done to the hypervisor hosts by removing, re-provisioning them and re-adding them. <!-- 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) - [x] 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. --> ### Scenario where new random volume access groups are created Steps to reproduce in test environment with two hosts: 1. - Create VMs 2. - Remove all hosts 3. - Re-Add hosts 4. - Start VMs _Outcome before applying this patch:_ A new volume access group is created with the convention CloudStack-RandomUUID _After applying this patch:_ If an existing volume access group with the naming convention CloudStack-clusterUuId exists, it will be used otherwise a volume access group with this naming convention will be created. ### Backward Compatibility test 1. - initial scenario old code, two hosts, volume access group name with random-uuid 2. - switch to new code 3. - remove one host 4. - re-add host _Outcome before applying this patch:_ no new volume access group created, existing volume access group with random-uuid is used. _After applying this patch:_ no new volume access group created, existing volume access group with random-uuid is used. A scenario with one host in the new group and one in the old does not occur for the above tests <!-- 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: us...@infra.apache.org