feature: websocket server framework, logs web session implementation#12053
feature: websocket server framework, logs web session implementation#12053shwstppr wants to merge 4 commits intoapache:mainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12053 +/- ##
============================================
- Coverage 18.00% 17.96% -0.05%
- Complexity 16466 16472 +6
============================================
Files 5977 6005 +28
Lines 537777 539459 +1682
Branches 66037 66201 +164
============================================
+ Hits 96844 96894 +50
- Misses 430011 431639 +1628
- Partials 10922 10926 +4
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.
Pull Request Overview
This PR introduces a comprehensive WebSocket server framework enabling both standalone (Netty-based) and embedded (Jetty-based) WebSocket server modes. The first implementation provides a Logs Web Session feature allowing ROOT administrators to securely stream and view management server logs in real-time via the UI.
Key changes:
- New WebSocket framework with flexible server configuration (standalone/embedded modes)
- Logs Web Session API and UI for real-time log streaming with filtering
- Database schema additions for session and management server configuration storage
Reviewed Changes
Copilot reviewed 88 out of 88 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| framework/websocket-server/* | Core WebSocket server framework with Netty implementation and router |
| plugins/logs-web-server/* | Logs web session plugin with API, streaming, and session management |
| ui/src/components/view/LogsConsole.vue | New UI component for displaying real-time logs with filtering |
| ui/src/utils/plugins.js | Enhanced job polling with log viewing capabilities |
| engine/schema/.../schema-42200to42300.sql | Database schema for logs sessions and management server details |
| client/src/main/java/.../ServerDaemon.java | Jetty server integration for embedded WebSocket support |
| server/src/main/java/.../ManagementServerImpl.java | Management server capabilities and configuration updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ogs-web-server/src/main/java/org/apache/cloudstack/logsws/LogsWebSessionTokenCryptoUtil.java
Outdated
Show resolved
Hide resolved
| export const pollJobPlugin = { | ||
| install (app) { | ||
| function canViewLogs (logIds) { | ||
| console.log('canViewLogs', store.getters.features.logswebserverenabled, 'createLogsWebSession' in store.getters.apis, logIds, logIds && logIds.length > 0) |
There was a problem hiding this comment.
Console.log statement should be removed from production code. This debug logging can expose sensitive information and impact performance.
| if (result.logids) { | ||
| allLogIds.push(...result.logids) | ||
| } | ||
| console.log('pollJobPlugin', result.logids, allLogIds) |
There was a problem hiding this comment.
Console.log statement should be removed from production code. Debug logging should use proper logging mechanisms instead of console.log.
engine/schema/src/main/resources/META-INF/db/schema-42200to42300.sql
Outdated
Show resolved
Hide resolved
...t-server/src/main/java/org/apache/cloudstack/framework/websocket/server/WebSocketServer.java
Outdated
Show resolved
Hide resolved
...t-server/src/main/java/org/apache/cloudstack/framework/websocket/server/WebSocketServer.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. |
|
@blueorangutan package |
|
@shwstppr 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 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15848 |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 17423 |
This feature enables administrators to view management server logs directly in the UI through a dedicated API call. It leverages a Netty-based websocket server to stream logs in real time, offering an efficient way to monitor and debug server operations. Note that the plugin is disabled by default and must be enabled manually. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17425 |
|
@blueorangutan test keepEnv |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15840) |
84268d3 to
dbe9dc4
Compare
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17427 |
Description
This PR introduces a WebSocket framework, enabling flexible configuration and management of WebSocket server and contexts.
The framework allows WebSocket services to run either as:
The first implementation built on this framework is the Logs Web Session, which allows ROOT administrators to securely stream and view logs in real-time via the UI, tied to specific API calls or actions.
Key Features
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?