DK101010 opened a new pull request #6012:
URL: https://github.com/apache/cloudstack/pull/6012
### Description
This is more a POC and it is still under development but it is a bigger
chance therefore I want a bit feedback please.
**Motivation:**
Some applications needs an specific volume controller configuration. For
example to get a optimal performance or it is necessary to get an certificate.
Therefore admins needs a opportunity to add an volume to certain controller.
**Implementation:**
Decided to add a VolumeGroup class as an abstract object to manage this
feature.
A volume group is a triple of vm id, volume id and group number.
- group number == bus number
- groups are optional, user can work like before
- groups can only created via api
- during the attach the group will be create
- if vm have got mixed volumes with and without groups,
attach order is: root vol, vol with groups(order by disk seq), vols
without groups(order by disk seq).
**SQL for Update:**
```
DROP TABLE IF EXISTS `cloud`.`volume_group`;
CREATE TABLE IF NOT EXISTS `cloud`.`volume_group`(
`id` bigint unsigned PRIMARY KEY AUTO_INCREMENT COMMENT 'Primary Key',
`vm_id` bigint unsigned NOT NULL COMMENT 'foreign key to vm table',
`volume_id` bigint unsigned NOT NULL COMMENT 'foreign key to volume
table',
`group_number` int unsigned NOT NULL COMMENT 'group number of volume',
FOREIGN KEY(vm_id) REFERENCES vm_instance (id),
FOREIGN KEY(volume_id) REFERENCES volumes (id)
);
```
<!---
*********************************************************************************
-->
<!--- 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)
- [x] New feature (non-breaking change which adds functionality)
- [ ] 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
#### 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 -->
--
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]