Relative log folder override stopped working as expected for proxies (possibly for all minions) #38663

Open
alexbleotu opened this Issue Jan 10, 2017 · 3 comments

Projects

None yet

2 participants

@alexbleotu
Contributor
alexbleotu commented Jan 10, 2017 edited

Description of Issue/Question

My override in the proxy's config file is

log_dir: var/log

Previously the log file was (as expected): ${root_folder}/var/log/salt/proxy
It switched to being: ${root_folder}/ var/tmp/var/log/salt/proxy, both in the develop branch and in the 2016.3 branch.

It's worth mentioning that nowhere in my config do I have the var/tmp override, so I think it's a bug.

@Ch3LL
Contributor
Ch3LL commented Jan 11, 2017

@alexbleotu i'm having a hard time replicating this. Here is my test case maybe you can correct me and i'm just approaching it or understanding it incorrectly.

  1. salt-proxy -ldebug --proxyid ec2 (start proxy minion)
  2. see where its logging

Everytime its always located in /var/log/salt/proxy even if i set your log_dir setting you have or not in versions 2015.8.5, 2016.3.4 adn 2016.11.1. Can you correct my test case or include more information?

@Ch3LL Ch3LL added this to the Blocked milestone Jan 11, 2017
@alexbleotu
Contributor

With the log_dir option in the configuration file you can override the log location. It wouldn't be in /var/log location anymore.

@alexbleotu
Contributor

I did a bit more digging and it was because I recently added default path overrides by creating a salt._syspaths module (because of a test on develop that started testing if it can create folders in the default locations, so I needed to override the default locations).

This exposed a bug in config/__init__.py, prepend_root_dir in which it doesn't correctly strip out the default salt.syspaths.ROOT_DIR which had been prependend automatically in the salt.syspaths module. I will submit a fix shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment