Sitelet https://github.com/Netis/cloud-probe/issues/266
Skip to content

cpdaemon: examples/template.json documents cpdaemon keys that are never read #266

Description

@vaderyang

Summary

cpdaemon/examples/template.json shows the following keys, and cpdaemon reads none of them:

  • cpm.worker.unix_socket. The code reads cpm.worker.control.unix.path.
  • cpm.worker.memory.policy
  • cpm.worker.memory.libpcap.fixed_buffer_size_mb
  • cpm.worker.memory.pipeline.min_buffer_size_mb

For the three memory keys, the code reads cpm.worker.memory_policy.*.

An operator who edits these settings from the template gets no effect and no warning.

Expected

Either fix the template to use the keys the daemon reads, or accept the documented names. Unknown keys could also be warned about at startup.

Reproduction

TestExampleConfigKeysAreRead/template in cpdaemon/cmd/internal/asm/asm_contract_test.go walks every leaf key of each example file and checks it against VKey. It is registered as a known failure. basic-logfile.json and basic-stderr.json pass.

Requirement REQ-DAEMON-WIRING, verification-coverage round 7.

中文原文

examples/template.json 中有 4 个键从不被读取:cpm.worker.unix_socket(代码读的是 worker.control.unix.path),以及 cpm.worker.memory.{policy, libpcap.fixed_buffer_size_mb, pipeline.min_buffer_size_mb}(代码读的是 worker.memory_policy.*)。照模板修改配置不会生效,也没有任何提示。

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions