-
Notifications
You must be signed in to change notification settings - Fork 830
Description
Describe the bug
Since my upgrade to cortex 1.18 the --runtime-config.file parameter which on 1.15 correctly worked now prepends /var/lib/cortex/ to the path of the file , this breaks the configuration .
To Reproduce
Steps to reproduce the behavior:
start cortex .. e.g
/usr/local/bin/cortex -target=compactor --config.file /etc/cortex/compactor.yaml --runtime-config.file=/etc/cortex/runtime.yaml
ts=2024-09-18T11:14:49.664309188Z caller=main.go:199 level=info msg="Starting Cortex" version="(version=1.18.0, branch=release-1.18, revision=85511746c)"
ts=2024-09-18T11:14:49.665081612Z caller=server.go:319 level=info http=10.4.0.95:9015 grpc=10.4.0.95:9915 msg="server listening on addresses"
ts=2024-09-18T11:14:49.666242068Z caller=module_service.go:64 level=info msg=initialising module=server
ts=2024-09-18T11:14:49.6664001Z caller=module_service.go:64 level=info msg=initialising module=runtime-config
ts=2024-09-18T11:14:49.666663303Z caller=cortex.go:447 level=error msg="module failed" module=runtime-config err="invalid service state: Failed, expected: Running, failure: failed to load runtime config: read file: open file: stat /var/lib/cortex/etc/cortex/runtime.yaml: stat /var/lib/cortex/etc/cortex/runtime.yaml: no such file or directory"
Expected behavior
A clear and concise description of what you expected to happen.
The 1.15 binary with the same config clearly worked
]$ /usr/local/bin/cortex -target=compactor --config.file /etc/cortex/compactor.yaml --runtime-config.file=/etc/cortex/runtime.yaml
level=info ts=2024-09-18T11:14:14.582945025Z caller=main.go:194 msg="Starting Cortex" version="(version=1.15.3, branch=release-1.15, revision=21e836605)"
level=info ts=2024-09-18T11:14:14.584000908Z caller=server.go:323 http=10.4.0.95:9015 grpc=10.4.0.95:9915 msg="server listening on addresses"
level=info ts=2024-09-18T11:14:14.585541585Z caller=module_service.go:64 msg=initialising module=server
level=info ts=2024-09-18T11:14:14.585704046Z caller=module_service.go:64 msg=initialising module=memberlist-kv
level=info ts=2024-09-18T11:14:14.58575076Z caller=module_service.go:64 msg=initialising module=runtime-config
level=info ts=2024-09-18T11:14:14.585926847Z caller=module_service.go:64 msg=initialising module=compactor
Environment:
- Infrastructure: bare-metal
- Deployment tool: manual
Additional Context
This happens for all targets,
A quick fix was to symlink the file,
This might be related to the changes introduced by #5292