FS#66662 - [traefik] 2.2.21 - Service does not work out of the box
Attached to Project:
Community Packages
Opened by Joan Coll Cerdán (johanbcn) - Friday, 15 May 2020, 15:48 GMT
Last edited by Christian Rebischke (Shibumi) - Saturday, 27 June 2020, 16:12 GMT
Opened by Joan Coll Cerdán (johanbcn) - Friday, 15 May 2020, 15:48 GMT
Last edited by Christian Rebischke (Shibumi) - Saturday, 27 June 2020, 16:12 GMT
|
Details
Description:
Starting the service after a fresh install does not work right away, because of the following settings: 1. [Unit] AssertPathExists=/etc/traefik/traefik.toml 2. [Service] ExecStart=/usr/bin/traefik --configFile=/etc/traefik/traefik.toml 3. [Service] ReadWritePaths=/etc/traefik/acme.json The main problem is that neither of the referenced files in these settings are created by default on a fresh install, and thus it fails to start. But more importantly, none of these files are required for traefik to start, as it already includes some sensible defaults if no config file is found and no override flag parameters are provided. So, in my opinion, the following changes should be made: 1. Since traefik already searches first by default a config file in /etc/traefik/traefik.{toml,yml,yaml}, let the user choose whichever configuration file format they want to use instead of enforcing TOML. Just remove the AssertPathExists setting from the Unit section and remove the --configFile flag from the ExecStart setting from the Service section. 2. ReadWritePaths setting requires the file to exist, and the acme.json file is only necessary if you enable the Let's Encrypt provider AND want to use the file system storage; otherwise it's totally unnecessary, so it should not be enforced to exist. Removing this might break existing installs, so maybe this one file should be created by default by the package. Steps to reproduce: 1. Install the package on a fresh install: pacman -S traefik 2. Start the service right away: systemctl start traefik |
This task depends upon
Closed by Christian Rebischke (Shibumi)
Saturday, 27 June 2020, 16:12 GMT
Reason for closing: Fixed
Additional comments about closing: traefik-2.2.1-2
Saturday, 27 June 2020, 16:12 GMT
Reason for closing: Fixed
Additional comments about closing: traefik-2.2.1-2
Thanks for reporting this. My fault, I always tested with my own traefik configuration :'D
I will fix this ASAP.