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 2022/02/21 08:35:42 UTC

[GitHub] [cloudstack] DK101010 opened a new pull request #6012: Add volume group handling

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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DK101010 commented on a change in pull request #6012: Add volume group handling

Posted by GitBox <gi...@apache.org>.
DK101010 commented on a change in pull request #6012:
URL: https://github.com/apache/cloudstack/pull/6012#discussion_r810948692



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java
##########
@@ -61,6 +61,9 @@
             required=true, description="    the ID of the virtual machine")
     private Long virtualMachineId;
 
+    @Parameter(name = ApiConstants.VOLUME_GROUP, type = CommandType.INTEGER, required = false, description = "group of volume")

Review comment:
       sure, I will add this.




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DK101010 commented on pull request #6012: Add volume group handling

Posted by GitBox <gi...@apache.org>.
DK101010 commented on pull request #6012:
URL: https://github.com/apache/cloudstack/pull/6012#issuecomment-1074867397


   Hi @DaanHoogland, @nvazquez, 
   I have a question, what I have to do to add follow code 
   
   ```
   def importUnmanagedInstance(self, command, method="GET"):
            response = importUnmanagedInstanceResponse()
            response = self.connection.marvinRequest(command, response_type=response, method=method)
            return response  
   ```
   to 
   
   ```
   cloudstack/tools/marvin/marvin/cloudstack/cloudstackAPIClient.py
   ```
   
   I added in my env, but it seems to be automated generated or ? 


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #6012: Add volume group handling

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #6012:
URL: https://github.com/apache/cloudstack/pull/6012#discussion_r810919844



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java
##########
@@ -61,6 +61,9 @@
             required=true, description="    the ID of the virtual machine")
     private Long virtualMachineId;
 
+    @Parameter(name = ApiConstants.VOLUME_GROUP, type = CommandType.INTEGER, required = false, description = "group of volume")

Review comment:
       can you add a since attribute?




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DK101010 commented on pull request #6012: Add volume group handling

Posted by GitBox <gi...@apache.org>.
DK101010 commented on pull request #6012:
URL: https://github.com/apache/cloudstack/pull/6012#issuecomment-1075179785


   Ahh, ok a case of self confusion :D. Thanks you two


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #6012: Add volume group handling

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #6012:
URL: https://github.com/apache/cloudstack/pull/6012#issuecomment-1075107972


   > Hi @DaanHoogland, @nvazquez, I have a question, what I have to do to add follow code
   > ```
   > cloudstack/tools/marvin/marvin/cloudstack/cloudstackAPIClient.py
   > ```
   > 
   > I added in my env, but it seems to be automated generated or ?
   
   yes, it should be auto generated.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DK101010 commented on pull request #6012: Add volume group handling

Posted by GitBox <gi...@apache.org>.
DK101010 commented on pull request #6012:
URL: https://github.com/apache/cloudstack/pull/6012#issuecomment-1046672383


   > like the idea, is this (meant to be) vmware only?
   
   In the future also for KVM  but for now only for vmware. 


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6012: Add volume group handling

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6012:
URL: https://github.com/apache/cloudstack/pull/6012#issuecomment-1075127069


   Hi @DK101010 - just extending @DaanHoogland's answer. It should be generated by building marvin: `mvn -P developer -pl :cloud-marvin` and upgrade the packages `pip install --upgrade tools/marvin/dist/Marvin-*.tar.gz`


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org