Skip to content

feat: add OBLogService log collection and bump version to 5.0.3 - #1277

Merged
hidb4ai merged 2 commits into
oceanbase:masterfrom
askdb:codex/feat-1276-oblogservice-log-collection
Nov 23, 2026
Merged

hidb4ai merged 2 commits into
oceanbase:masterfrom
askdb:codex/feat-1276-oblogservice-log-collection

Conversation

@askdb

@askdb askdb commented Nov 20, 2026

Copy link
Copy Markdown
Member

Summary

OBLogService writes its own logs and needs an independent collection entry point. Add obdiag gather oblogservice_log and an oblogservice configuration section, and bump the release version to 5.0.3.

  • Read per-instance connection settings and installation directories from oblogservice.servers.nodes / servers.global. No obcluster section, SQL credentials, or Observer discovery is required. The public section is oblogservice, not the OBD deployment name oblogservice-ce.
  • Collect current logs and 14-digit timestamp rotations from home_path/log, supporting --scope oblogservice / all, time windows, recent-file selection, repeated keyword filters, and compressed rotations.
  • Preserve original modification times, including after keyword filtering, and identify archives by installation directory for multiple instances on the same host.
  • Add CLI help, an agent tool and guidance, shell completion, standalone and combined configuration examples, and regression tests.
  • Update pyproject.toml and the Makefile release version to 5.0.3 while retaining the packaging-time version template.

Closes #1276.

Validation

  • Python 3.14: pytest -q --import-mode=importlib test/common test/analyzer --ignore=test/common/ssh_client — 197 passed, 89 subtests passed.
  • Python 3.11 on Linux: the same suite — 197 passed, 89 subtests passed.
  • Verified an actual OBD-managed deployment during implementation and after completion, using three OBLogService instances on one host. The final checks covered nonempty INFO collection, recent rotations, a fixed historical time window, standalone and combined configuration files, invalid scope, and missing component configuration.
  • Verified 15 archive members against source modification times at tar's recorded precision, including 5 stable source files with exact matches.
  • Verified the existing gather log command still creates the two expected Observer archives without OBLogService files when both components are configured.
  • Verified the validation launcher reports 5.0.3 after applying the existing packaging-time version substitution.
  • Black 24.8.0 (--check -S -l 256 .), Python file-header checks, and git diff --check passed on a clean source snapshot. Shell completion and agent routing are covered by tests.

Validation limits

The existing SSH-client suite is excluded because of baseline missing-module and test-fixture failures. Live deployment validation used the local transport; Docker/Kubernetes connection settings and client dispatch are covered with mocks, not live container tests. No existing transport implementation is changed.

Comment thread example/all-components-with-oms.yml Outdated
- ip: 192.168.1.8
- ip: 192.168.1.9
global:
# 连接账号需要读取日志及写入临时目录的权限;密钥路径位于运行 obdiag 的机器上。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释用英文吧

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@hidb4ai
hidb4ai merged commit c6fb1fe into oceanbase:master Nov 23, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support collecting OBLogService logs

2 participants