-
Notifications
You must be signed in to change notification settings - Fork 0
CSTACKEX-25: ONTAP Primary storage pool creation #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
994aac7 to
11693f3
Compare
plugins/storage/volume/ontap/pom.xml
Outdated
| </parent> | ||
| <properties> | ||
| <spring-cloud.version>2021.0.7</spring-cloud.version> | ||
| <spring-boot.version>2.7.10</spring-boot.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this and below commented ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken care of
| private String name; | ||
| private List<AggregateDTO> aggregates; | ||
| private SvmDTO svm; | ||
| private Integer size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it of type Long. And please mention the comment stating "this value would always be in bytes".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
|
||
| return null; | ||
|
|
||
| String url = dsInfos.get("url").toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add logger with input map values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
|
||
| // Additional details requested for ONTAP primary storage pool creation | ||
| @SuppressWarnings("unchecked") | ||
| Map<String, String> details = (Map<String, String>)dsInfos.get("details"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We have to check for empty and null both.
- We have to throw exceptions in case of failed validations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added where its necessary
| public boolean attachZone(DataStore dataStore, ZoneScope scope, Hypervisor.HypervisorType hypervisorType) { | ||
| return false; | ||
| List<HostVO> hostsToConnect = new ArrayList<>(); | ||
| Hypervisor.HypervisorType[] hypervisorTypes = {Hypervisor.HypervisorType.XenServer, Hypervisor.HypervisorType.VMware, Hypervisor.HypervisorType.KVM}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please limit support for the KVM hypervisor for now. I think that the remaining would be done in future releases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
...olume/ontap/src/main/java/org/apache/cloudstack/storage/provider/StorageProviderManager.java
Outdated
Show resolved
Hide resolved
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
| } | ||
| } | ||
|
|
||
| if (storagePoolName == null || storagePoolName.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add check for space
| // TODO: scheme could be 'custom' in our case and we might have to ask 'protocol' separately to the user | ||
| if (scheme.equalsIgnoreCase(Constants.NFS)) { | ||
| parameters.setType(Storage.StoragePoolType.NetworkFilesystem); | ||
| } else if (scheme.equalsIgnoreCase(Constants.ISCSI)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO:// Compare it with custom
and specific protocol field should be included on UI and validated here
| Username = username; | ||
| Password = password; | ||
| ManagementLIF = managementLIF; | ||
| OntapStorage.SVM = SVM; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should just be 'svm'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this in feign/model
| import org.springframework.stereotype.Component; | ||
|
|
||
| @Component | ||
| public class StorageProviderManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the name to StorageProviderFactory
| public StorageProviderManager(OntapStorage ontapStorage) { | ||
| String protocol = ontapStorage.getProtocol(); | ||
| s_logger.info("Initializing StorageProviderManager with protocol: " + protocol); | ||
| if (protocol.equalsIgnoreCase(Constants.NFS)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change this to switch and add isDisaggregated flag to OntapStoragr, add the respective condition here
| try { | ||
| // Call the SVM API to check if the SVM exists | ||
| Svm svm = null; | ||
| URI url = URI.create(Constants.HTTPS + storage.getManagementLIF() + Constants.GETSVMs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a common method to Utility.java for uri creation
| details.get(Constants.MANAGEMENTLIF), details.get(Constants.SVMNAME), scheme); //TODO: Here the passing 'scheme' might need a re-look | ||
| StorageProviderManager storageProviderManager = new StorageProviderManager(ontapStorage); | ||
| StorageStrategy storageStrategy = storageProviderManager.getStrategy(); | ||
| boolean isValid = storageStrategy.connect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put this in try catch
| boolean isValid = storageStrategy.connect(); | ||
| if (isValid) { | ||
| // String volumeName = storagePoolName + "_vol"; //TODO: Figure out a better naming convention | ||
| storageStrategy.createVolume(storagePoolName, Long.parseLong((details.get("size")))); // TODO: size should be in bytes, so see if conversion is needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try catch block
| public boolean attachCluster(DataStore dataStore, ClusterScope scope) { | ||
| logger.debug("In attachCluster for ONTAP primary storage"); | ||
| PrimaryDataStoreInfo primarystore = (PrimaryDataStoreInfo)dataStore; | ||
| List<HostVO> hostsToConnect = _resourceMgr.getEligibleUpAndEnabledHostsInClusterForStorageConnection(primarystore); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add check to see if the host supports iscsi, because the scheme could be 'custom'
| for (HostVO host : hostsToConnect) { | ||
| // TODO: Fetch the host IQN and add to the initiator group on ONTAP cluster | ||
| try { | ||
| _storageMgr.connectHostToSharedPool(host, dataStore.getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read about connectHostsToPool and decide on which one to use
rajiv-jain-netapp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please exclude the files which are taken from other PR and repost.
…gorithm (apache#11751) * Consider Instance in Starting state as well for allocation algorithm * use IN instead of OR statement
…rotocols for password reset (apache#11228)
…n during mgmt server / agent start (apache#11722)
This PR adds support for specifying user data (cloud-init) for system VMs via Zone Scoped global settings. This allows the operators to customize the System VMs and setup monitoring, logging or execute any custom commands. We set the user data from the global setting in /var/cache/cloud/cmdline, and use the NoCloud datasource to process user data. cloud-init service is still disabled in the system VMs and it's executed as part of the cloud-postinit service which executes the postinit.sh script. Added global settings: systemvm.userdata.enabled - Disabled by default. Needs to be enabled to utilize the feature. console.proxy.vm.userdata - UUID of the User data to be used for Console Proxy secstorage.vm.userdata - UUID of the User data to be used for Secondary Storage VM virtual.router.userdata - UUID of the User data to be used for Virtual Routers
* Return details of the storage pool in the response including url, and update capacityBytes and capacityIops if applicable while creating storage pool * Added capacitybytes parameter to the storage pool response in sync with the capacityiops response parameter and createStoragePool cmd request parameter (existing disksizetotal parameter in the storage pool response can be deprecated) * Don't keep url in details * Persist the capacityBytes and capacityIops in the storage_pool_details table while creating storage pool as well, for consistency - as these are updated with during update storage pool * rebase with main fixes
…pache#11488) Addresses apache#11483 Signed-off-by: Abhishek Kumar <[email protected]>
Co-authored-by: Henrique Sato <[email protected]>
…ls during zone deployment (apache#11760)
apache#11773) * storage: change storage pool to Up state when cancel storage migration * Update 11773: connect host to shared pool after cancelling storage migration * Update 11773: update db only * Update 11773: skip capacity update for storpool
… added EOF fixes + correcting license header
…POJOs" This reverts commit fe0f752.
…POJOs" This reverts commit 28faca1.
* CSTACKEX-29 Cluster, SVM and Aggr Feign Client * CSTACKEX-29 Change the endpoint method name in feign client * CSTACKEX-29 Make the alignment proper * CSTACKEX-29 Added License Info * CSTACKEX-29 Resolve Review Comments * CSTACKEX-29 Remove Component Annotation from datastoredriverclass * CSTACKEX-29 Resolve Style check issues * CSTACKEX-29 Resolve ALL Style issues * CSTACKEX-29 Resolve Precommits Issues * CSTACKEX-29 Added Method comments and change the ontap response class name --------- Co-authored-by: Gupta, Surya <[email protected]>
* CSTACKEX-31 NAS and Job Feign Client and POJOs * CSTACKEX-31 Fixed Checks Issues * CSTACKEX-31 Resolve Review Comments * CSTACKEX-31 Resolve Review Comments * CSTACKEX-31 Resolve Review Comments * CSTACKEX-31 Added Aggr and size to volume model * CSTACKEX-31 Change the export policy endpoint path * CSTACKEX-31 Fixed check styles --------- Co-authored-by: Gupta, Surya <[email protected]>
…ommits. # This is the 1st commit message: CSTACKEX-25: Basic class structure # This is the commit message #2: Add PrimaryStoragePool base code # This is the commit message #3: CSTACKEX-25: Create Volume code basic code added # This is the commit message #4: CSTACKEX-25: additional logic for Primary storage pool creation # This is the commit message #5: CSTACKEX-29 Cluster, SVM and Aggr Feign Client # This is the commit message #6: CSTACKEX-29 Added License Info # This is the commit message #7: CSTACKEX-29 Resolve Review Comments # This is the commit message #8: CSTACKEX-29 Resolve Style check issues � This is the commit message #9: CSTACKEX-29 Resolve Style check issues � This is the commit message #10: CSTACKEX-29 Resolve Precommits Issues # This is the commit message #11: CSTACKEX-29 Resolve Precommits Issues
Add PrimaryStoragePool base code CSTACKEX-25: Create Volume code basic code added CSTACKEX-25: additional logic for Primary storage pool creation CSTACKEX-29 Cluster, SVM and Aggr Feign Client CSTACKEX-29 Added License Info CSTACKEX-29 Resolve Review Comments CSTACKEX-29 Resolve Style check issues � This is the commit message #9: CSTACKEX-29 Resolve Style check issues � This is the commit message #10: CSTACKEX-29 Resolve Precommits Issues CSTACKEX-29 Resolve Precommits Issues CSTACKEX-25: PrimaryStoragePool create workflow almost done CSTACKEX-25: PrimaryStoragePool create workflow almost done CSTACKEX-25: Added license string to new file
9072bc3 to
0be388b
Compare
Description
This PR...
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?