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

Rathole config watcher doesn't work with symlinks #359

Open
yashgorana opened this issue May 1, 2024 · 1 comment
Open

Rathole config watcher doesn't work with symlinks #359

yashgorana opened this issue May 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@yashgorana
Copy link

Describe the bug
When config files are symlinks, rathole won't pickup any changes file pointed to by the symlink. This is needed to detect any changes that are made to a Kubernetes ConfigMap mounted to a rathole pod at a path.

To Reproduce
Steps to reproduce the behavior:

  1. Create a test/config.toml
  2. Create a symlink ln -s ./test/config.toml ./config.toml
  3. Run rathole --server ./config.toml
  4. Edit test/config.toml or config.toml to change the server config to bind_addr = "0.0.0.0:1333"
  5. Observe changes are not picked up and rathole doesn't hot reload.

Configuration

[server]
bind_addr = "0.0.0.0:2333"

[server.services.domain]
token = "domain-specific-rathole-secret"
bind_addr = "0.0.0.0:8001"

Logs

No hot reload log even after changing the config

$ RUST_BACKTRACE=1 rathole ./server.toml
2024-05-01T13:34:09.659589Z  INFO rathole::server: Listening at 0.0.0.0:2333
2024-05-01T13:34:09.659660Z  INFO config_watcher{path="./server.toml"}: rathole::config_watcher: Start watching the config

Environment:

  • OS: Linux Container, Kubernetes
  • rathole --version output:
rathole
Build Timestamp:     2023-10-01T10:08:07.162273634Z
Build Version:       0.5.0
Commit SHA:          None
Commit Date:         None
Commit Branch:       None
cargo Target Triple: x86_64-unknown-linux-gnu
cargo Profile:       release
cargo Features:      base64,client,default,futures_core,futures_sink,hot_reload,noise,notify,server,snowstorm,tls,tokio_native_tls,tokio_tungstenite,tokio_util,websocket
  • CPU architecture: amd64
  • rustc version: N/A
@yashgorana yashgorana added the bug Something isn't working label May 1, 2024
@Bubbleioa
Copy link

Just change this line.
Bubbleioa@5017970

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants