Skip to content

Conversation

@Fricounet
Copy link
Contributor

Overview

Please briefly describe the changes your pull request makes.

The fields APISock and SupervisorPath were never populated in the daemonInfo sock which caused them to default to empty string in the json output of the system socket endpoint:

curl -s --unix-socket //containerd-local/sock/nydus-system.sock http://localhost/api/v1/daemons | jq
[
  {
    "id": "d5f6s3pjjoq5d6nj99c0",
    "pid": 416701,
    "api_socket": "",
    "supervisor_path": "",
    "reference": 1,
    "mountpoint": "/containerd-local/io.containerd.snapshotter.v1.nydus/snapshots/110/mnt",
    "startup_cpu_utilization": 0,
    "memory_rss_kb": 231524,
    "read_data_kb": 2915.5996,
    "instances": {
      "110": {
        "snapshot_id": "110",
        "snapshot_dir": "/containerd-local/io.containerd.snapshotter.v1.nydus/snapshots/110",
        "mountpoint": "/containerd-local/io.containerd.snapshotter.v1.nydus/snapshots/110/mnt",
        "image_id": "localhost:5000/busybox:nydus-only"
      }
    }
  }
]

Related Issues

Please link to the relevant issue. For example: Fix #123 or Related #456.

Change Details

Please describe your changes in detail:

Test Results

_If you have any relevant screenshots or videos that can help illustrate your changes, please add them here.

Now the output looks better:

curl -s --unix-socket //containerd-local/sock/nydus-system.sock http://localhost/api/v1/daemons | jq
[
  {
    "id": "d5f6pn1jjoq3fsrdhvpg",
    "pid": 416712,
    "api_socket": "/containerd-local/io.containerd.snapshotter.v1.nydus/socket/d5f6pn1jjoq3fsrdhvpg/api.sock",
    "supervisor_path": "",
    "reference": 1,
    "mountpoint": "/containerd-local/io.containerd.snapshotter.v1.nydus/snapshots/115/mnt",
    "startup_cpu_utilization": 0,
    "memory_rss_kb": 228776,
    "read_data_kb": 2915.5996,
    "instances": {
      "115": {
        "snapshot_id": "115",
        "snapshot_dir": "/containerd-local/io.containerd.snapshotter.v1.nydus/snapshots/115",
        "mountpoint": "/containerd-local/io.containerd.snapshotter.v1.nydus/snapshots/115/mnt",
        "image_id": "localhost:5000/busybox:nydus-only"
      }
    }
  }
]

Change Type

Please select the type of change your pull request relates to:

  • Bug Fix
  • Feature Addition
  • Documentation Update
  • Code Refactoring
  • Performance Improvement
  • Other (please describe)

Self-Checklist

Before submitting a pull request, please ensure you have completed the following:

  • I have run a code style check and addressed any warnings/errors.
  • I have added appropriate comments to my code (if applicable).
  • I have updated the documentation (if applicable).
  • I have written appropriate unit tests.

…ons output

The fields APISock and SupervisorPath were never populated in the daemonInfo sock which caused them to default to empty string in the json output of the system socket endpoint

Signed-off-by: Baptiste Girard-Carrabin <[email protected]>
@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.31%. Comparing base (57b640f) to head (056b79f).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
pkg/system/system.go 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #703      +/-   ##
==========================================
+ Coverage   20.91%   21.31%   +0.39%     
==========================================
  Files         122      123       +1     
  Lines       11071    11333     +262     
==========================================
+ Hits         2316     2416     +100     
- Misses       8436     8594     +158     
- Partials      319      323       +4     
Files with missing lines Coverage Δ
pkg/system/system.go 5.24% <0.00%> (-0.05%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant