Syslog logging was added in Salt v0.11.0 [1], but currently configuring Salt to use syslog fails is syslog is not running (or installed). [1]: https://github.com/saltstack/salt/pull/2778 Reproducible: Always Steps to Reproduce: 1. emerge -v =app-admin/salt 2. sed -i 's|^#\(log_file: file:///dev/log\)|\1|' /etc/salt/minion 3. sed -i 's|^\(#log_level_logfile:.*\)$|\1\nlog_level_logfile: info|' /etc/salt/minion 4. rc-service syslog-ng stop 5. rc-service salt-minion start Actual Results: * Starting SALT minion daemon ... No handlers could be found for logger "salt.log.setup" * start-stop-daemon: failed to start `/usr/bin/salt-minion' * Failed to start salt-minion [ !! ] * ERROR: salt-minion failed to start Expected Results: * Starting syslog-ng ... [ ok ] * Starting SALT minion daemon ... [ ok ] I'd suggest the Salt ebuild add 'syslog' to IUSE, and if that was set, add a virtual/logger RDEPEND and a 'need logger' clause to the init scripts' depend()s (for both the master and minion scripts). The syslog use flag should be enabled by default, since Salt apparently tries to use syslog by default (and currently crashes as a result).
Created attachment 371354 [details, diff] Patch sketching out my suggested approach for the 9999 ebuild This also bumps the 9999 ebuild to use the *-2 forms of the conf and init scripts, which were added for 0.17.4-r2.
(In reply to W. Trevor King from comment #0) > 1. emerge -v =app-admin/salt Oops, I meant: emerge -v app-admin/salt (without the leading '=').
The: No handlers could be found for logger "salt.log.setup" error from the original report was with Salt v2014.1.0 (installed via the live ebuild). With app-admin/salt-0.17.4-r2 the rc start succeeds, but the minion crashes afterwards. When I run the minion directly, I see the error message: # salt-minion [ERROR ] Failed to setup the Syslog logging handler: [Errno 111] Connection refused I'll attach my emerge info for the 0.17.4-e2 install next.
Created attachment 371356 [details] emerge --info from my app-admin/salt-0.17.4-r2 test Salt doesn't have a stable ebuild, so I also have: $ cat /etc/portage/package.accept_keywords # required by app-admin/salt (argument) =app-admin/salt-0.17.4-r2 ~amd64 # required by app-admin/salt-0.17.4-r2 # required by app-admin/salt (argument) =dev-python/msgpack-0.4.1 ~amd64 # required by app-admin/salt-0.17.4-r2 # required by app-admin/salt (argument) =dev-python/pyyaml-3.10-r1 ~amd64 # required by app-admin/salt-0.17.4-r2 # required by app-admin/salt (argument) =dev-python/pycryptopp-0.6.0 ~amd64
I added a "use logger" to the init script for 2014.1.0, this will make sure that the logger is started before salt if it is enabled. As syslog is only needed when enabled in the config file, not too many ebuilds actually depend on a logger since systems are generally not very useful without a logger anyway.
(In reply to Patrick McLean from comment #5) > I added a "use logger" to the init script for 2014.1.0, this will make sure > that the logger is started before salt if it is enabled. Works for me, thanks :).