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

@Include symblink config file is not supported #1436

Closed
zw963 opened this issue Jul 12, 2019 · 7 comments
Closed

@Include symblink config file is not supported #1436

zw963 opened this issue Jul 12, 2019 · 7 comments
Labels
Stale waiting-for-user Waiting for more information, tests or requested changes

Comments

@zw963
Copy link

zw963 commented Jul 12, 2019

Reproduce

My config file is organized like following:

[root@10-8-130-243 td-agent-bit]# pwd
/etc/td-agent-bit
[root@10-8-130-243 td-agent-bit]# ls *.conf -alh
lrwxrwxrwx 1 root root 120 Jul 12 21:40 hardware_monitor.conf -> /home/deployer/apps/test_fluentd/test_fluentd_app2/current/config/containers/fluentbit/config/hardware_monitor_app2.conf
lrwxrwxrwx 1 root root 111 Jul 12 21:40 parsers.conf -> /home/deployer/apps/test_fluentd/test_fluentd_app2/current/config/containers/fluentbit/config/parsers_app2.conf
lrwxrwxrwx 1 root root 111 Jul 12 21:40 plugins.conf -> /home/deployer/apps/test_fluentd/test_fluentd_app2/current/config/containers/fluentbit/config/plugins_app2.conf
lrwxrwxrwx 1 root root 116 Jul 12 21:40 td-agent-bit.conf -> /home/deployer/apps/test_fluentd/test_fluentd_app2/current/config/containers/fluentbit/config/td-agent-bit_app2.conf
[root@10-8-130-243 td-agent-bit]# 

Symlink is not broken:

[root@10-8-130-243 td-agent-bit]# cat hardware_monitor.conf 
[INPUT]
    Name cpu
    Tag  stats.cpu.app2
    # Interval Sec
    # ====
    # Read interval (sec) Default: 1
    Interval_Sec 1

[INPUT]
    Name disk
    Tag  stats.disk.app2

[INPUT]
    Name mem
    Tag  stats.mem.app2

[INPUT]
    Name          netif
    Tag           stats.net.app2
    Interface     eth0

[OUTPUT]
    Name  influxdb
    Match stats.*
    Database stats[root@10-8-130-243 td-agent-bit]# 

When use include in main config:

@INCLUDE hardware_monitor.conf

Get following error in systemd (append a extra / in path config//hardware_monitor.conf)

Jul 12 21:58:30 10-8-130-243 td-agent-bit[14582]: [2019/07/12 21:58:30] [Warning] [config] I cannot open /home/deployer/apps/test_fluentd/test_fluentd_app2/releases/20190712133948/config/containers/fluentbit/config//hardware_monitor.conf file
Jul 12 21:58:30 10-8-130-243 td-agent-bit[14582]: Error: Configuration file contain errors. Aborting

i can reporoduce manually.

[root@10-8-130-243 /]# cd /home
[root@10-8-130-243 home]# td-agent-bit -c /etc/td-agent-bit/td-agent-bit.conf
Fluent Bit v1.2.1
Copyright (C) Treasure Data

[2019/07/12 21:59:07] [Warning] [config] I cannot open /home/deployer/apps/test_fluentd/test_fluentd_app2/releases/20190712133948/config/containers/fluentbit/config//hardware_monitor.conf file
Error: Configuration file contain errors. Aborting
@edsiper
Copy link
Member

edsiper commented Jul 23, 2019

I tried to reproduce without success:

$ ls -l
total 4
-rw-r--r-- 1 edsiper edsiper 19 jul 23 11:31 fluent-bit.conf
lrwxrwxrwx 1 edsiper edsiper 42 jul 23 11:31 link.conf -> /tmp/data/conf/issues/1436/fluent-bit.conf
$ cat fluent-bit.conf 
@INCLUDE link.conf
$ cat link.conf 
[SERVICE]
    Flush        5
    Daemon       Off
    Log_Level    info

[INPUT]
    Name cpu
    Tag  cpu.local
    Interval_Sec 1

[OUTPUT]
    Name  stdout
    Match *
$ ../../build/bin/fluent-bit -c fluent-bit.conf 
Fluent Bit v1.3.0
Copyright (C) Treasure Data

[2019/07/23 11:33:05] [ info] [storage] initializing...
[2019/07/23 11:33:05] [ info] [storage] in-memory
[2019/07/23 11:33:05] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2019/07/23 11:33:05] [ info] [engine] started (pid=26005)
[2019/07/23 11:33:05] [ info] [sp] stream processor started
^C[engine] caught signal (SIGINT)
[2019/07/23 11:33:06] [ info] [input] pausing cpu.0

@edsiper edsiper added the waiting-for-user Waiting for more information, tests or requested changes label Jul 23, 2019
@zw963
Copy link
Author

zw963 commented Jul 25, 2019

Thank you for reply.

$ cat link.conf 

Is link.conf is a symblink to /tmp/data/conf/issues/1436/link.conf too?

BTW: i am copy all config into /etc, so there is no issue now.

@edsiper
Copy link
Member

edsiper commented Jul 29, 2019

yes, it's a symbolic link, no issues here.

@zw963
Copy link
Author

zw963 commented Aug 9, 2019

For my case, fluent-bit.conf is a symblink too.

i consider config @INCLUDE link.conf in symblink version fluent-bit.conf is not same behavior as normal version.

Thank.

@krancour
Copy link
Contributor

I stumbled into replicating this issue-- but, oddly, only in a Windows container. My fluent-bit.conf can be a symlink and it's no problem, but any of the files it includes cannot be. Everywhere else, I've observed this working as I expected.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

@github-actions github-actions bot added the Stale label Jan 28, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2022

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale waiting-for-user Waiting for more information, tests or requested changes
Projects
None yet
Development

No branches or pull requests

3 participants