#1430 Prosody 0.11 does not update paths.config after it finds the config file (regression)

Reporter Sonny Piers
Owner Nobody
Created
Updated
Stars ★ (1)
Tags
  • Status-Accepted
  • Type-Defect
  • Milestone-0.11
  • Priority-Medium
  1. Sonny Piers on

    The xmpp.js project uses awesome prosody for integration/e2e tests. Unfortunately prosody 0.11 breaks them. Basically we start/stop/restart prosody dynamically with custom config/data paths. You can reproduce with git clone --depth=1 https://github.com/xmppjs/xmpp.js.git cd xmpp.js/server PROSODY_CONFIG=prosody.cfg.lua prosody cat prosody.err What is the expected output? Nothing, prosody reads the ssl configuration relative to the config file correctly. What do you see instead? `...error SSL/TLS: Failed to load '/etc/prosody/localhost.key'...` Prosody tries to read `localhost.crt` and `localhost.key` from /etc/prosody instead of relative to the config file. What version of the product are you using? On what operating system? Prosody 0.11.2 Arch Linux Please provide any additional information below. Still works on our CI because we still have Prosody 0.10 there.

  2. Zash on

    Thanks for the report. util.startup.read_config() does not appear to update prosody.paths.config, only CFG_CONFIGDIR, so prosody.paths.config stays as the original value of CFG_CONFIGDIR. That then gets used to turn relative file names in the config into absolute ones. This should be an easy fix, but I'm uncertain about what happens if the config path is set to '.', since prosody changes working directory to the data dir, and then '.' would refer to that and then relative config paths would not work anymore.

    Changes
    • tags Status-Accepted Milestone-0.11
  3. Sonny Piers on

    If anyone else is running into this; using absolute paths in the config file is a workaround example https://github.com/xmppjs/xmpp.js/pull/775/files

New comment

Not published. Used for spam prevention and optional update notifications.