Salt: "[WARNING ] The file_roots parameter is not properly formatted, using defaults"

Created on 19 Jan 2019  路  5Comments  路  Source: saltstack/salt

Description of Issue/Question

I keep getting [WARNING ] The file_roots parameter is not properly formatted, using defaults in the systemd journal on my master and I can't seem to figure out where it's coming from/why it's happening...

What's weird is I get it even when I comment out the file_roots i have in there (as shown below).

Setup

interface: '::'
ipv6: True
show_jid: True
strip_colors: False
cli_summary: True
keysize: 4096
sign_pub_messages: True
ssl:
  keyfile: /etc/letsencrypt/live/[REDACTED]/privkey.pem
  certfile: /etc/letsencrypt/live/[REDACTED]/fullchain.pem
  ssl_version: PROTOCOL_TLSv1_2
failhard: True
hash_type: sha512
fileserver_backend:
  - roots
  - git
pillar_roots:
  - /srv/pillar

I've confirmed it parses to valid YAML with loading it via PyYAML and writing out to a file with pyaml:

import yaml
import pyaml

with open('/etc/salt/master', 'r') as f:
    c = f.read()

y = yaml.load(c)

with open('/root/saltconf.yml', 'wb') as f:
    f.write(pyaml.dumps(y))

which yields:

cli_summary: true
failhard: true
fileserver_backend:
  - roots
  - git
hash_type: sha512
interface: '::'
ipv6: true
keysize: 4096
pillar_roots:
  - /srv/pillar
show_jid: true
sign_pub_messages: true
ssl:
  certfile: /etc/letsencrypt/live/[REDACTED]/fullchain.pem
  keyfile: /etc/letsencrypt/live/[REDACTED]/privkey.pem
  ssl_version: PROTOCOL_TLSv1_2
strip_colors: false

Steps to Reproduce Issue

See above.

Versions Report

Salt Version:
           Salt: 2018.3.3

Dependency Versions:
           cffi: 1.11.5
       cherrypy: unknown
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.8
        libgit2: 0.26.8
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: 2.17
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.26.4
         Python: 3.4.9 (default, Aug 14 2018, 21:28:57)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.4.2
            ZMQ: 4.1.4

System Versions:
           dist: centos 7.6.1810 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-957.1.3.el7.x86_64
         system: Linux
        version: CentOS Linux 7.6.1810 Core
Bug P4 severity-low stale

Most helpful comment

@johnnybubonic Thanks for reporting this. I've submitted a PR which should make things more clear in the future.

All 5 comments

(whoops, forgot to scrub)

anyways, i think i found what caused it, but the error message is incorrect. it was pillar_roots, not file_roots (i'm assuming the pillar_roots are parsed with the same function as file_roots, hence the error text?)

this works:

cli_summary: true
failhard: true
fileserver_backend:
  - roots
  - git
hash_type: sha512
interface: '::'
ipv6: true
keysize: 4096
pillar_roots:
  base:
    - /srv/pillar
show_jid: true
sign_pub_messages: true
ssl:
  certfile: /etc/letsencrypt/live/[REDACTED]/fullchain.pem
  keyfile: /etc/letsencrypt/live/[REDACTED]/privkey.pem
  ssl_version: PROTOCOL_TLSv1_2
strip_colors: false

being that pillar_roots is now a dict instead of a list.

@johnnybubonic Thanks for reporting this. I've submitted a PR which should make things more clear in the future.

cheers! thanks!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

whoops; seems resolved, closing

Was this page helpful?
0 / 5 - 0 ratings