andrijapanicsb commented on PR #14231: URL: https://github.com/apache/cloudstack/pull/14231#issuecomment-7121519363
Hey people, thanks for the detailed test notes. As you can assume - I used Claude Fable 5.2 and Codex Astra 6.2 for several rounds of cross-review of `9cd4591`. Isolated tests reproduced the query-string export, the servlet cleanup issue, and the JSON parse failure. This review did not run a full CloudStack management server. The aim is only to avoid regressions later, not to slow this down, so please correct anything that is off. 1. **[Critical for the documented setup] Keep API credentials out of exported spans.** With OTel Java agent 2.16.0, a collector received `url.query=reviewmarker=blue` from a harmless request. CloudStack API URLs can contain `apikey`, `signature`, or `sessionkey`. This behavior predates the PR, but the setup recommended here should keep those values inside the management JVM. Overwriting `url.query` in a servlet filter worked for a request that reached it. `StringUtils.cleanString()` has no rule for `apikey` or `signature`. Could you verify the proposed protection with dummy values at the collector's input, before any collector-side redaction? Please cover both a normal request and one that ends before the filter runs. [Sanitizer](https://github.com/apache/cloudstack/blob/9cd4591/utils/src/main/java/com/cloud/utils/StringUtils.java#L144-L173) 2. **[Potential regression] Remove `cmdInfo` from the UUID warning.** A system-initiated VM work job can pass a serialized work order to a parser expecting JSON. On failure, the new WARN includes the entire payload and stack trace, even with tracing and DEBUG disabled. The job ID and command type should be enough to diagnose it. [Warning](https://github.com/apache/cloudstack/blob/9cd4591/core/src/main/java/org/apache/cloudstack/threadcontext/ThreadContextUtil.java#L99-L111) 3. **[Potential regression] Preserve external-DHCP discovery after a lookup fails.** One exception now ends the startup scan. Startup continues, but this server's poller only visits NICs already added to its map. The posted run reported zero eligible networks and zero NICs added. Could we split out the rewrite, or handle failures per network and test that a healthy network after a failing one still gets its eligible NIC queued? [Startup scan](https://github.com/apache/cloudstack/blob/9cd4591/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java#L2517-L2597) 4. **[Reproduced regression] Fix servlet cleanup on pooled threads.** After normal servlet teardown clears the logging context, the filter calls `LogContext.current()` in `finally`, creating a fresh `logcontextid` that remains on the thread. Please test normal return, early return, and an exception on a reused thread. On early exit, cleanup should preserve logging values that were present before the filter ran. [Filter](https://github.com/apache/cloudstack/blob/9cd4591/api/src/main/java/org/apache/cloudstack/api/filter/ApiTraceFilter.java#L45-L57) 5. **[To check] Show the trace handoff for one deployment.** In the posted test without the agent, API job 39 stored the request ID. Its `VmWorkStart` job 40 had `related: 39` and `context: NULL`. Could you run one deployment with the agent attached, identify both jobs, and show the HTTP and VM-work spans with their parent or span link? If separate traces are intended, please document how an operator follows one deployment across them. [Posted test](https://github.com/apache/cloudstack/pull/14231#pullrequestreview-5317982760) When rebasing for milestone 4.22.3, please move `async_job.context` into the 4.22.2→4.22.3 migration using `IDEMPOTENT_ADD_COLUMN`. One upgrade from a 4.22.2 database lacking the column, followed by an async API call, would cover this. On the forward-merge to `main`, the 4.23→24 step also needs the idempotent addition for installations already on released 4.23.0.0. A release note would help operators account for the log layout and JVM logging changes that apply even with tracing disabled. Unrelated to this PR: we also found separate upgrade issues, including the Netris VNET cleanup. They are reported in https://github.com/apache/cloudstack/issues/14835 -- 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]
