You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "sureshanaparti (via GitHub)" <gi...@apache.org> on 2026/01/08 12:38:26 UTC
[PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
sureshanaparti opened a new pull request, #12391:
URL: https://github.com/apache/cloudstack/pull/12391
### Description
This PR improves PowerFlex/ScaleIO client initialization , authentication and command execution.
- Handles busy-wait for ScaleIO client authentication, and client creation potential deadlock
- Adds default timeout 5 minutes for PowerFlex commands (_dfv_cfg_, etc.) execution (instead of default 60 min.) to fit into asynchronous command (Management Server -> Agent) timeout.
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- 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: # -->
<!--- ******************************************************************************* -->
<!--- NOTE: AUTOMATION 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)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] 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)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### 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 -->
#### How did you try to break this feature and the system with this change?
<!-- 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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "borisstoyanov (via GitHub)" <gi...@apache.org>.
borisstoyanov commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3767834234
@blueorangutan test
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3921926710
@vladimirpetrov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#discussion_r2797576407
##########
framework/config/src/main/java/org/apache/cloudstack/framework/config/ConfigKey.java:
##########
@@ -400,6 +400,13 @@ protected T valueInGlobalOrAvailableParentScope(Scope scope, Long id) {
return value();
}
+ /**
+ * Use {@link ConfigKey#valueInScope(Scope, Long)} instead.
+ */
+ public T valueInDomain(Long domainId) {
+ return valueInScope(Scope.Domain, domainId);
+ }
Review Comment:
```suggestion
/**
* @deprecated
* Still used by some external code but, use {@link ConfigKey#valueInScope(Scope, Long)} instead.
*/
@Deprecated
public T valueInDomain(Long domainId) {
return valueInScope(Scope.Domain, domainId);
}
```
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3891317956
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16814
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3925776781
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3891016059
@blueorangutan package
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3767837556
@borisstoyanov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "vladimirpetrov (via GitHub)" <gi...@apache.org>.
vladimirpetrov commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3890412710
@blueorangutan package
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#discussion_r2797480978
##########
framework/config/src/main/java/org/apache/cloudstack/framework/config/ConfigKey.java:
##########
@@ -400,6 +400,13 @@ protected T valueInGlobalOrAvailableParentScope(Scope scope, Long id) {
return value();
}
+ /**
+ * Use {@link ConfigKey#valueInScope(Scope, Long)} instead.
+ */
+ public T valueInDomain(Long domainId) {
+ return valueInScope(Scope.Domain, domainId);
+ }
Review Comment:
right, why add this method if you do not want it used?
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3894833212
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "vladimirpetrov (via GitHub)" <gi...@apache.org>.
vladimirpetrov commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3921910689
@blueorangutan test
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3723722219
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/12391?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 3.57%. Comparing base ([`425c4e3`](https://app.codecov.io/gh/apache/cloudstack/commit/425c4e33120fbde8f0d3c890ac50d79d0b5f9c18?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`cce01f1`](https://app.codecov.io/gh/apache/cloudstack/commit/cce01f1f7e52c375422651afa2948558f69341bf?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (425c4e3) and HEAD (cce01f1). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (425c4e3) | HEAD (cce01f1) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.22 #12391 +/- ##
=============================================
- Coverage 17.59% 3.57% -14.02%
=============================================
Files 5910 445 -5465
Lines 529692 37599 -492093
Branches 64716 6936 -57780
=============================================
- Hits 93202 1346 -91856
+ Misses 425998 36087 -389911
+ Partials 10492 166 -10326
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/12391/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/12391/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.57% <ø> (ø)` | |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/12391/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/12391?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3930818487
<b>[SF] Trillian test result (tid-15501)</b>
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 50930 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12391-t15501-kvm-ol8.zip
Smoke tests completed. 146 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
ContextSuite context=TestListIdsParams>:teardown | `Error` | 1.09 | test_list_ids_parameter.py
test_01_snapshot_root_disk | `Error` | 3.89 | test_snapshots.py
test_02_list_snapshots_with_removed_data_store | `Error` | 46.37 | test_snapshots.py
test_02_list_snapshots_with_removed_data_store | `Error` | 46.38 | test_snapshots.py
ContextSuite context=TestSnapshotStandaloneBackup>:teardown | `Error` | 27.21 | test_snapshots.py
test_01_snapshot_usage | `Error` | 19.46 | test_usage.py
test_01_vpn_usage | `Error` | 1.07 | test_usage.py
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3889868559
@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.
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3889061790
@blueorangutan package
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#discussion_r2672231523
##########
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImpl.java:
##########
@@ -281,7 +284,11 @@ private <T> T get(final String path, final Class<T> type, final boolean renewAnd
HttpResponse response = null;
boolean responseConsumed = false;
try {
- while (authenticating); // wait for authentication request (if any) to complete (and to pick the new session key)
+ while (authenticating) { // wait for authentication request (if any)
+ // to complete (and to pick the new session key)
+ Thread.yield();
Review Comment:
The busy-wait loop with Thread.yield() can cause excessive CPU usage when waiting for authentication to complete. Thread.yield() is a hint to the scheduler but provides no guaranteed waiting period, so the loop may spin very rapidly consuming CPU cycles. Consider using a small Thread.sleep() instead, or better yet, using proper synchronization primitives like CountDownLatch or wait/notify to eliminate busy-waiting entirely.
```suggestion
try {
Thread.sleep(10L);
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
break;
}
```
##########
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/manager/ScaleIOSDCManagerImpl.java:
##########
@@ -425,20 +424,26 @@ public String getConnectedSdc(Host host, DataStore dataStore) {
@Override
public boolean isHostSdcConnected(String sdcId, DataStore dataStore, int waitTimeInSecs) {
long poolId = dataStore.getId();
- logger.debug(String.format("Waiting (for %d secs) for the SDC %s of the pool %s to connect",
- waitTimeInSecs, sdcId, dataStore));
+ logger.debug("Waiting (for {} secs) for the SDC {} of the pool {} to connect", waitTimeInSecs, sdcId, dataStore);
int timeBetweenTries = 1000; // Try more frequently (every sec) and return early if connected
- while (waitTimeInSecs > 0) {
+ for (int i = 0; i < waitTimeInSecs; i++) {
+ logger.debug("Attempt {} of {} for the SDC {} of the pool {} to connect", i + 1, waitTimeInSecs, sdcId, dataStore);
if (isHostSdcConnected(sdcId, poolId)) {
+ logger.debug("Attempt {} of {} successful for the SDC {} of the pool {} to connect", i + 1, waitTimeInSecs, sdcId, dataStore);
return true;
}
- waitTimeInSecs--;
try {
Thread.sleep(timeBetweenTries);
} catch (Exception ignore) {
}
}
- return isHostSdcConnected(sdcId, poolId);
+ boolean isConnected = isHostSdcConnected(sdcId, poolId);
+ if (isConnected) {
+ logger.debug("Final attempt succeeded the SDC {} of the pool {} to connect", sdcId, dataStore);
+ } else {
+ logger.debug("Final attempt failed the SDC {} of the pool {} to connect", sdcId, dataStore);
Review Comment:
The error message contains grammatical issues. "Final attempt succeeded the SDC" should be "Final attempt succeeded for the SDC" or "Final attempt to connect the SDC succeeded". Similarly, "Final attempt failed the SDC" should be "Final attempt failed for the SDC" or "Final attempt to connect the SDC failed".
```suggestion
logger.debug("Final attempt to connect the SDC {} of the pool {} succeeded", sdcId, dataStore);
} else {
logger.debug("Final attempt to connect the SDC {} of the pool {} failed", sdcId, dataStore);
```
##########
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImpl.java:
##########
@@ -316,7 +323,10 @@ private <T> T post(final String path, final Object obj, final Class<T> type, fin
HttpResponse response = null;
boolean responseConsumed = false;
try {
- while (authenticating); // wait for authentication request (if any) to complete (and to pick the new session key)
+ while (authenticating) { // wait for authentication request (if any)
+ // to complete (and to pick the new session key)
+ Thread.yield();
Review Comment:
The busy-wait loop with Thread.yield() can cause excessive CPU usage when waiting for authentication to complete. Thread.yield() is a hint to the scheduler but provides no guaranteed waiting period, so the loop may spin very rapidly consuming CPU cycles. Consider using a small Thread.sleep() instead, or better yet, using proper synchronization primitives like CountDownLatch or wait/notify to eliminate busy-waiting entirely.
```suggestion
try {
Thread.sleep(10L);
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
break;
}
```
##########
framework/config/src/main/java/org/apache/cloudstack/framework/config/ConfigKey.java:
##########
@@ -400,6 +400,13 @@ protected T valueInGlobalOrAvailableParentScope(Scope scope, Long id) {
return value();
}
+ /**
+ * Use {@link ConfigKey#valueInScope(Scope, Long)} instead.
+ */
+ public T valueInDomain(Long domainId) {
+ return valueInScope(Scope.Domain, domainId);
+ }
Review Comment:
The documentation comment is misleading. It states "Use ConfigKey#valueInScope(Scope, Long) instead" which suggests this method is deprecated, but there is no @Deprecated annotation. If this is a deprecated method meant to guide users to the preferred API, it should have the @Deprecated annotation. If it's just a convenience method, the documentation should clarify that rather than suggesting users should use a different method.
##########
plugins/storage/volume/scaleio/src/test/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImplTest.java:
##########
@@ -110,25 +108,31 @@ public void testClientAuthSuccess() {
client.listStoragePools();
+ wireMockRule.verify(getRequestedFor(urlEqualTo("/api/login"))
+ .withBasicAuth(new BasicCredentials(username, password)));
+
wireMockRule.verify(getRequestedFor(urlEqualTo("/api/types/StoragePool/instances"))
.withBasicAuth(new BasicCredentials(username, sessionKey)));
}
@Test(expected = CloudRuntimeException.class)
public void testClientAuthFailure() throws Exception {
+ Assert.assertNotNull(client);
+
wireMockRule.stubFor(get("/api/login")
.willReturn(unauthorized()
.withHeader("content-type", "application/json;charset=UTF-8")
.withBody("")));
- new ScaleIOGatewayClientImpl("https://localhost/api", username, password, false, timeout, maxConnections);
+ client.listStoragePools();
+
+ wireMockRule.verify(getRequestedFor(urlEqualTo("/api/login"))
+ .withBasicAuth(new BasicCredentials(username, password)));
Review Comment:
The verification call at lines 129-130 is unreachable code. Since the test expects a CloudRuntimeException to be thrown at line 127, execution will not reach the verification statement. This verification should be removed as it serves no purpose and creates misleading test code.
```suggestion
```
##########
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/util/ScaleIOUtil.java:
##########
@@ -226,14 +231,10 @@ public static boolean removeMdms(String... mdmAddresses) {
}
} else {
String command = String.format(REMOVE_MDM_CMD_TEMPLATE, mdmAddress, DRV_CFG_FILE);
- String stdErr = Script.executeCommand(command).second();
- if(StringUtils.isEmpty(stdErr)) {
- // restart SDC needed only if configuration file modified manually (not by CLI)
- restartSDC = true;
- changesApplied = true;
- } else {
- LOGGER.error(String.format("Failed to remove MDM %s from %s: %s", mdmAddress, DRV_CFG_FILE, stdErr));
- }
+ Script.runSimpleBashScript(command, DEFAULT_TIMEOUT_MS);
+ // restart SDC needed only if configuration file modified manually (not by CLI)
+ restartSDC = true;
+ changesApplied = true;
Review Comment:
The error handling from the original code has been removed. Previously, the code checked if stderr was empty to determine success, and logged an error if the command failed. Now the code assumes the command always succeeds and sets changesApplied to true unconditionally. This means failures in the sed command will go undetected, and the method may incorrectly report success when the MDM was not actually removed from the configuration file.
```suggestion
String result = Script.runSimpleBashScript(command, DEFAULT_TIMEOUT_MS);
if (result == null) {
LOGGER.error("Failed to remove MDM [{}] from configuration file using command: {}", mdmAddress, command);
} else {
// restart SDC needed only if configuration file modified manually (not by CLI)
restartSDC = true;
changesApplied = true;
}
```
##########
plugins/storage/volume/scaleio/src/test/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImplTest.java:
##########
@@ -138,19 +142,23 @@ public void testRequestTimeout() {
.withBody("")));
client.listStoragePools();
+
+ wireMockRule.verify(getRequestedFor(urlEqualTo("/api/login"))
+ .withBasicAuth(new BasicCredentials(username, password)));
Review Comment:
The verification call at lines 146-147 is unreachable code. Since the test expects a ServerApiException to be thrown at line 144, execution will not reach the verification statement. This verification should be removed as it serves no purpose and creates misleading test code.
```suggestion
```
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3890732878
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 16811
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3899435008
<b>[SF] Trillian test result (tid-15449)</b>
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 55677 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12391-t15449-kvm-ol8.zip
Smoke tests completed. 146 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
ContextSuite context=TestListIdsParams>:teardown | `Error` | 1.15 | test_list_ids_parameter.py
test_01_snapshot_root_disk | `Error` | 6.80 | test_snapshots.py
test_02_list_snapshots_with_removed_data_store | `Error` | 57.55 | test_snapshots.py
test_02_list_snapshots_with_removed_data_store | `Error` | 57.55 | test_snapshots.py
ContextSuite context=TestSnapshotStandaloneBackup>:teardown | `Error` | 40.92 | test_snapshots.py
test_01_snapshot_usage | `Error` | 19.63 | test_usage.py
test_01_vpn_usage | `Error` | 1.36 | test_usage.py
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3724014636
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16303
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3890156771
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 16809
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3894832072
@blueorangutan test
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3889325744
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 16806
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3891021617
@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.
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3922082543
<b>[SF] Trillian Build Failed (tid-15499)<b/>
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3723711707
@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.
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3723708056
@blueorangutan package
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3889864024
@blueorangutan package
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3889068309
@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.
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3890426461
@vladimirpetrov 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.
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3925772176
@blueorangutan test
--
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
Re: [PR] PowerFlex/ScaleIO client initialization, authentication and command execution improvements [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12391:
URL: https://github.com/apache/cloudstack/pull/12391#issuecomment-3770829500
<b>[SF] Trillian test result (tid-15207)</b>
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 53999 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12391-t15207-kvm-ol8.zip
Smoke tests completed. 148 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_03_deploy_and_scale_kubernetes_cluster | `Failure` | 28.89 | test_kubernetes_clusters.py
--
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