genegr commented on PR #13060:
URL: https://github.com/apache/cloudstack/pull/13060#issuecomment-4335468937

   
   @DaanHoogland — yes, this is fine to ship in 4.20/4.22. Rebased onto 
`apache/cloudstack:4.20`; the three commits replay cleanly with no conflicts:
   
   ```
   36a732b870  flasharray: authenticate via REST 2.x api-token and discover API 
version
   50b560a4e9  flasharray: address review on login()
   29385709cb  flasharray: align api_version close-error log text with actual 
path
   ```
   
   Round 1 (`50b560a4e9`) addresses the original review:
   
   - **`if (!apiVersionExplicit)`** instead of `if (apiVersion == null)` on 
both the connection-details branch and the query-params branch 
(@sureshanaparti). Semantically equivalent — now reads "explicitly configured?" 
which is what the logic actually means.
   - **`vResp.close()` in the `api_version` discovery finally is now wrapped in 
try/catch**, logging any `IOException` at `debug` so a failed close cannot mask 
an otherwise-successful version discovery (@Copilot).
   - **`response.close()` after the legacy username/password exchange is now 
wrapped in try/catch** with the same debug-level log, for the same reason 
(@Copilot).
   
   Round 2 (`29385709cb`):
   
   - **Log text matches the actual call** — Copilot pointed out the debug 
message said `/api/api_version` but the path passed to the helper is 
`/api_version` (the helper itself prepends `url + apiVersion`). Updated to 
`Error closing /api_version response from FlashArray [...]`.
   
   ### Still open
   
   - The deprecation WARN for legacy username/password auth is currently 
emitted on every login/refresh. With the default key TTL ~14 min, that's noisy 
across multiple legacy-configured pools. I can either (a) suppress subsequent 
WARNs via a per-URL `Set<String>` so it logs once per adapter endpoint, or (b) 
downgrade subsequent emits to DEBUG. Happy to apply whichever you prefer — flag 
in this thread and I'll fold it into a follow-up commit.
   
   Smoke-tested locally: login via `api_token` (2.x-only path) and login via 
username/password (deprecation-warning path) both succeed; pool capacity 
polling and volume create still work.
   
   


-- 
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]

Reply via email to