Skip to content
New issue

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

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

Already on GitHub? # to your account

[Bug] data_providers设置auto_reload: true时,使用vi编辑文件时只在第一次文件会被重载,后续编辑不再被重载 #430

Closed
4 tasks done
unicser opened this issue Jul 6, 2022 · 1 comment

Comments

@unicser
Copy link

unicser commented Jul 6, 2022

在提交之前,请确认

  • 我已经尝试搜索过 Issue ,但没有找到相关问题。
  • 我正在使用最新的 mosdns 版本(或者最新的 commit),问题依旧存在。
  • 我仔细看过 wiki 后仍然无法自行解决该问题。
  • 我非常确定这是 mosdns 核心的问题。(如果是通过第三方衍生软件使用 mosdns 核心,不确定问题源头时,请先向衍生软件开发者提交问题。)

mosdns 版本

v4.1.5

操作系统

Debian Buster

Bug 描述和复现步骤

data_providers设置auto_reload: true时,使用vi编辑文件时只在第一次文件会被重载,后续编辑不在被重载

使用的配置文件

log:
  level: info
  file: ''

data_providers:
  - tag: data-test
    file: ./test.txt
    auto_reload: true

servers:
  - exec: sequence-5153
    listeners:
    - protocol: udp
      addr: :5153

plugins:
  - tag: 'forward_pub'
    type: fast_forward
    args:
      upstream:
      - addr: 'https://i.passcloud.xyz/dns-query'

  - tag: 'sequence-5153'
    type: sequence
    args:
      exec:
        - forward_pub

mosdns 的 log 记录

2022-07-06T22:25:29.417+0800    info    coremain/mosdns.go:123  loading plugin  {"tag": "forward_pub", "type": "fast_forward"}
2022-07-06T22:25:29.419+0800    info    coremain/mosdns.go:123  loading plugin  {"tag": "sequence-5153", "type": "sequence"}
2022-07-06T22:25:29.419+0800    info    coremain/server.go:76   starting server {"proto": "udp", "addr": ":5153"}
2022-07-06T22:25:54.486+0800    info    data_provider/data_provider.go:173      fs event        {"event": "\"test.txt\": RENAME"}
2022-07-06T22:25:54.580+0800    info    data_provider/data_provider.go:173      fs event        {"event": "\"test.txt\": CHMOD"}
2022-07-06T22:25:54.581+0800    info    data_provider/data_provider.go:173      fs event        {"event": "\"test.txt\": REMOVE"}
2022-07-06T22:25:55.582+0800    info    data_provider/data_provider.go:179      reloading file  {"file": "./test.txt"}
2022-07-06T22:25:55.583+0800    info    data_provider/data_provider.go:190      file reloaded   {"file": "./test.txt"}
@unicser unicser changed the title [Bug] [Bug] data_providers设置auto_reload: true时,使用vi编辑文件时只在第一次文件会被重载,后续编辑不再被重载 Jul 6, 2022
@IrineSistiana
Copy link
Owner

62a54c7 应该没问题了

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants