Repository navigation
Description
Description of Issue/Question
I'm trying to run salt-master as unprivileged user in a dir from pip to test something. Even with cachedir set to a different location, master was still failing to start complaining about lack of access to /var/cache/salt/master/queues. Quick looking through sources found https://github.com/saltstack/salt/blob/develop/salt/queues/sqlite_queue.py whereas there are no mentions of that setting at https://docs.saltstack.com/en/latest/ref/configuration/master.html
Setup
Saltfile:
salt-master:
config_dir: .
log_level: debug
log_file: ./master.log
./master.d/master.conf:
pki_dir: /tmp/pki
cachedir: /tmp/saltcache
sock_dir: /tmp/salt/sock
conf_file: ./master.d/master.conf
Steps to Reproduce Issue
Starting salt-master with above config results in:
$ salt-master
[DEBUG ] Configuration file path: ./master.d/master.conf
Failed to create directory path "/var/cache/salt/master/queues" - [Errno 13] Permission denied: '/var/cache/salt/master'
Adding sqlite_queue_dir: /tmp/saltcache/queues to master config makes it start
Versions Report
Salt Version:
Salt: 2017.7.3
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.2
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.14 (default, Jan 5 2018, 10:41:29)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.4
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.6
System Versions:
dist:
locale: UTF-8
machine: x86_64
release: 4.14.15-1-hardened
system: Linux
version: Not Installed
Activity
viq commentedon Feb 3, 2018
And even with
sqlite_queue_dirdefined, there's a lot of logs like:gtmanfred commentedon Feb 5, 2018
When you fixed the sqlite_queue_dir, did you remove the cachedir configuration?
Because the line where that error originates from is looking to verify that the cachedir exists and is owned by the correct user.
viq commentedon Feb 5, 2018
No,
cachediris still there.gtmanfred commentedon Feb 5, 2018
So, the problem here is that the
masterconfig file does not exist in your config_dir.If you touch
$PWD/masterThis will all work.This is the same issue as #45315
And when I get time to just double check #45330 it will be fixed.
Daniel