-
Notifications
You must be signed in to change notification settings - Fork 1.2k
PowerFlex/ScaleIO MDM and host SDC connection enhancements #11047
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
base: main
Are you sure you want to change the base?
Conversation
…/unprepare, validate Storage Pool can be created in Agent. - Implemented validation to fail Host disconnect from Storage Pool if there are Volumes attached and SDC client MDM removal requires scini service to be restarted - Implemented Storage Pool validation by checking whether MDM addresses from configuration file and from memory (using CLI) matches, otherwise file ModifyStoragePool command. - Introduced configuration key to apply timeout after making MDM changes for ScaleIO: powerflex.mdm.change.apply.timeout.ms (default 1000ms) - Implemented logic to apply timeout after making MDM changes for ScaleIO in prepare and unprepare logic - Added detection of MDM removal support via CLI - If MDM removal support via CLI supported then use CLI, fall back to edit drv_cfg.txt and restart scini instead
… pool when SDC client restart required and there are volumes attached to the Host
…tack/storage/datastore/manager/ScaleIOSDCManager.java Co-authored-by: Suresh Kumar Anaparti <[email protected]>
…tack/storage/datastore/manager/ScaleIOSDCManager.java Co-authored-by: Suresh Kumar Anaparti <[email protected]>
…tack/storage/datastore/util/ScaleIOUtil.java Co-authored-by: Suresh Kumar Anaparti <[email protected]>
…y_guid, --rescan in drv_cfg cmd as it is not supported. --file parameter is supported with --add_mdm, --mod_mdm_ip, --remove_mdm, --set_guid, --set_mdm_password, --reset_mdm_password
@blueorangutan package |
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11047 +/- ##
============================================
+ Coverage 16.57% 16.60% +0.02%
- Complexity 13870 13924 +54
============================================
Files 5719 5730 +11
Lines 507200 508437 +1237
Branches 61574 61808 +234
============================================
+ Hits 84093 84422 +329
- Misses 413688 414574 +886
- Partials 9419 9441 +22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR enhances the handling of ScaleIO MDM and host SDC connections by introducing new configuration keys for timeouts, validation, and blocking behavior along with updating the underlying command execution and logging mechanisms.
- Introduced new configuration keys, including MdmsChangeApplyTimeout, ValidateMdmsOnConnect, and BlockSdcUnprepareIfRestartNeededAndVolumesAreAttached.
- Updated MDM add/remove logic to use varargs and improved command execution via Script.executeCommand.
- Adjusted test cases and adapter logic to account for the new ScaleIO configurations.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
utils/src/main/java/com/cloud/utils/script/Script.java | Added a new executeCommand(String) method for command execution including stdout/stderr handling. |
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/util/ScaleIOUtil.java | Refactored MDM add/remove methods and updated command templates, patterns, and file read operations. |
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/manager/ScaleIOSDCManagerImpl.java | Updated configuration details sent to hosts by including new timeout settings. |
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/manager/ScaleIOSDCManager.java | Introduced new config key definitions and updated the getConfigKeys() return values. |
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/lifecycle/ScaleIOPrimaryDataStoreLifeCycle.java | Injected the new configuration details during maintain and cancellation procedures. |
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClient.java | Added a short documentation comment for STORAGE_POOL_MDMS. |
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/ScaleIOStorageAdaptorTest.java | Updated test mocks to reflect changes in command executions for MDM removal. |
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/ScaleIOStorageAdaptor.java | Introduced validation of MDM state and timeout application after MDM changes. |
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtModifyStoragePoolCommandWrapper.java | Wrapped storage pool creation in a try/catch block to better handle CloudRuntimeException. |
Comments suppressed due to low confidence (1)
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/util/ScaleIOUtil.java:315
- [nitpick] The ordering of stdout and stderr here is reversed compared to other usages of Script.executeCommand; consider using a consistent ordering (stdout as first, stderr as second) to avoid confusion.
String stdErr = result.first(); String stdOut = result.second();
Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 13811 |
@blueorangutan package |
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13812 |
Description
This PR enhances the PowerFlex/ScaleIO MDM and host SDC connections, includes the following changes.
Introduced timeout configuration 'powerflex.mdm.change.apply.timeout.ms' (Default value: 1000 ms) at zone scope, to wait after MDM changes made on Host with ScaleIO SDC. Also, Changes to apply timeout after making MDM changes for ScaleIO in prepare and unprepare logic.
Introduced configuration flag 'powerflex.block.sdc.unprepare' (Default is false) at zone scope, to enable/disable blocking unprepare ScaleIO SDC connection when SDC client restart required and there are volumes attached to the Host. Added validation to fail Host disconnect from Storage Pool if there are Volumes attached and SDC client MDM removal requires scini service to be restarted.
Introduced configuration flag 'powerflex.mdm.validate.on.connect' (Default is false) at zone scope, to enable/disable validation of MDM addresses on Host from configuration file and from memory (using CLI) matches or not.
Added detection of MDM removal support via CLI. If MDM removal support via CLI supported then use CLI, Otherwise fall back to edit drv_cfg.txt and restart scini as earlier. Tested with /opt/emc/scaleio/sdc/bin/drv_cfg --version: DellEMC PowerFlex Version: R3_6.4000.124, with cmd: /opt/emc/scaleio/sdc/bin/drv_cfg --remove_mdm.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested the new settings, and PowerFlex SDC connections (MDM add/remove) with VM & Volume operations.
How did you try to break this feature and the system with this change?