Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"[WARNING ] The file_roots parameter is not properly formatted, using defaults" #51248

Open
johnnybubonic opened this issue Jan 19, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@johnnybubonic
Copy link

commented Jan 19, 2019

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
@johnnybubonic

This comment has been minimized.

Copy link
Author

commented Jan 19, 2019

(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.

@dwoz

This comment has been minimized.

Copy link
Contributor

commented Jan 22, 2019

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

@dwoz dwoz added this to the Approved milestone Jan 22, 2019

@johnnybubonic

This comment has been minimized.

Copy link
Author

commented Jan 22, 2019

cheers! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.