Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from netdata:master #315

Merged
merged 3 commits into from
Jan 22, 2025
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 22, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

Add support for CyberPower CP1600 UPS and fix architecture detection for libunwind and libbpf.

New Features:

  • Add CyberPower CP1600 UPS support.

Tests:

  • Update tests to include CP1600 UPS metrics.

ilyam8 and others added 3 commits January 22, 2025 10:12
* Fix up handling of libunwind in CMake.

- Fix the questionable default handling of CMAKE_SYSTEM_PROCESSOR so
  that it reliably reflects the target architecture.
- Add a case for handling 32-bit x86 builds with libunwind.
- Tweak the match cases for the various architectures to be more
  reliable.

* Fix libbpf usage of CMAKE_SYSTEM_PROCESSOR.
@pull pull bot added the ⤵️ pull label Jan 22, 2025
@pull pull bot merged commit 8fca437 into webfutureiorepo:master Jan 22, 2025
Copy link

sourcery-ai bot commented Jan 22, 2025

Reviewer's Guide by Sourcery

This pull request introduces a new UPS model (cp1600) to the upsd collector, fixes a bug in the stream parents logic, and updates the cmake build system to correctly detect the target architecture.

Sequence diagram for updated stream parent connection logic

sequenceDiagram
    participant Host as Host
    participant Parent as Stream Parent

    Host->>Parent: Attempt connection
    alt Parent is localhost/virtual
        Parent-->>Host: Reject connection
        Note over Host: Set postpone time 3600-7200s
        alt Parent in stream path
            Note over Host: Ban permanently
        end
    else Parent is initializing
        Parent-->>Host: Reject connection
        Note over Host: Set postpone time 30-60s
    else Parent already connected
        Parent-->>Host: Reject connection
        alt Parent in stream path
            Note over Host: Ban for session
            Note over Host: Set postpone time 3600-7200s
        end
    end
Loading

File-Level Changes

Change Details Files
Added support for the cp1600 UPS model to the upsd collector.
  • Added new metrics for the cp1600 UPS model in the test file.
  • Added new charts for the cp1600 UPS model in the charts file.
  • Added new variables for the cp1600 UPS model in the charts file.
src/go/plugin/go.d/collector/upsd/collector_test.go
src/go/plugin/go.d/collector/upsd/charts.go
Fixed a bug in the stream parents logic that was causing unnecessary connection attempts.
  • Added a check to prevent connection attempts to localhost when the parent is the origin child.
  • Added a check to prevent connection attempts to already connected parents.
  • Added a delay to connection attempts when the parent is initializing.
src/streaming/stream-parents.c
Updated the cmake build system to correctly detect the target architecture.
  • Added a function to fix up CMAKE_SYSTEM_PROCESSOR to match the build target.
  • Added a call to the new function in the main CMakeLists.txt file.
  • Updated the libbpf module to use the new function to detect the target architecture.
  • Added support for i?.86 architecture for libunwind.
  • Added support for ppc64 architecture for libunwind.
packaging/cmake/Modules/NetdataUtil.cmake
CMakeLists.txt
packaging/cmake/Modules/NetdataLibBPF.cmake

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants