bee icon indicating copy to clipboard operation
bee copied to clipboard

bee printconfig gives wrong info

Open cobordism opened this issue 1 year ago • 2 comments

Context

$ /usr/bin/bee version
2.1.0-de7eccc1
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm

Summary

bee was installed via apt install bee=2.1.0 and started via systemctl. The configuration file is in /etc/bee/bee.yaml

Expected behaviour

I expect bee printconfig to return the configuration of the running bee... or at least sudo bee printconfig. At the very very least I would expect sudo -u bee bee printconfig to print the correct config of the running bee and for the documentation to call out the need for sudo -u bee.

Actual behavior

bee printconfig prints the default configuration and completely ignores the configuration in /etc/bee that the running bee is using.

Steps to reproduce

install bee from apt repository. Start bee with systemctl start bee.service

note:

$ cat /etc/systemd/system/multi-user.target.wants/bee.service 
[Unit]
Description=Bee - Ethereum Swarm node
Documentation=https://docs.ethswarm.org
After=network.target

[Service]
EnvironmentFile=-/etc/default/bee
NoNewPrivileges=true
User=bee
Group=bee
ExecStart=/usr/bin/bee start --config /etc/bee/bee.yaml
Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target

Possible solution

query the running bee to dump its actually used configuration ?

cobordism avatar Oct 05 '24 10:10 cobordism

AFAIK, that is WAD - Working As Designed.

ldeffenb avatar Oct 05 '24 12:10 ldeffenb

AFAIK, that is WAD - Working As Designed.

then how would I query what the configuration is of the bee client that is currently running?

$ bee -h | grep printconfig
  printconfig Print default or provided configuration in yaml format

Looks like it should print default or provided configuration in yaml format. no?

cobordism avatar Oct 05 '24 15:10 cobordism

the printConfig will give you the default values your "/etc/bee/bee.yaml" will contain the config values that overwrite the defaults. so if you are interested in with that config values your own node is running with, it's the combination of the default and the config values in your file.

istae avatar Jan 29 '25 19:01 istae