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

Fixed pillar_roots generation for salt-master. #168

Merged
merged 1 commit into from
Aug 6, 2015

Conversation

jpic
Copy link
Member

@jpic jpic commented Aug 6, 2015

With a simple pillar like this::

$ sudo salt-call --config-dir /srv/etc/bootstrap --pillar-root /srv/pillar pillar.get salt:pillar_roots
local:
    ----------
    base:
        - /srv/pillar

This was generated in /etc/salt/master.d/f_defaults.conf::

# highstate format, and is generally just key/value pairs.
pillar_roots:base:- /srv/pillar
#

Resulting in parse errors by salt::

$ sudo salt '*' state.highstate
[ERROR   ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key
  in "<string>", line 531, column 1:
    pillar_roots:base:- /srv/pillar
    ^
could not found expected ':'
  in "<string>", line 532, column 1:
    #
    ^
[ERROR   ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key
  in "<string>", line 531, column 1:
    pillar_roots:base:- /srv/pillar
    ^
could not found expected ':'
  in "<string>", line 532, column 1:
    #
    ^

This patch will fix it as such::

      ID: salt-master
Function: file.recurse
    Name: /etc/salt/master.d
  Result: True
 Comment: Recursively updated /etc/salt/master.d
 Started: 11:37:12.946823
Duration: 6255.296 ms
 Changes:
          ----------
          /etc/salt/master.d/f_defaults.conf:
              ----------
              diff:
                  ---
                  +++
                  @@ -528,7 +528,9 @@
                   # Pillar is laid out in the same fashion as the file server, with environments,
                   # a top file and sls files. However, pillar data does not need to be in the
                   # highstate format, and is generally just key/value pairs.
                  -pillar_roots:base:- /srv/pillar
                  +pillar_roots:
                  +  base:
                  +    - /srv/pillar
                   #

Resulting in::

# highstate format, and is generally just key/value pairs.
pillar_roots:
  base:
    - /srv/pillar
#

With a simple pillar like this::

    $ sudo salt-call --config-dir /srv/etc/bootstrap --pillar-root /srv/pillar pillar.get salt:pillar_roots
    local:
        ----------
        base:
            - /srv/pillar

This was generated in /etc/salt/master.d/f_defaults.conf::

    # highstate format, and is generally just key/value pairs.
    pillar_roots:base:- /srv/pillar
    #

Resulting in parse errors by salt::

    $ sudo salt '*' state.highstate
    [ERROR   ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key
      in "<string>", line 531, column 1:
        pillar_roots:base:- /srv/pillar
        ^
    could not found expected ':'
      in "<string>", line 532, column 1:
        #
        ^
    [ERROR   ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key
      in "<string>", line 531, column 1:
        pillar_roots:base:- /srv/pillar
        ^
    could not found expected ':'
      in "<string>", line 532, column 1:
        #
        ^

This patch will fix it as such::

          ID: salt-master
    Function: file.recurse
        Name: /etc/salt/master.d
      Result: True
     Comment: Recursively updated /etc/salt/master.d
     Started: 11:37:12.946823
    Duration: 6255.296 ms
     Changes:
              ----------
              /etc/salt/master.d/f_defaults.conf:
                  ----------
                  diff:
                      ---
                      +++
                      @@ -528,7 +528,9 @@
                       # Pillar is laid out in the same fashion as the file server, with environments,
                       # a top file and sls files. However, pillar data does not need to be in the
                       # highstate format, and is generally just key/value pairs.
                      -pillar_roots:base:- /srv/pillar
                      +pillar_roots:
                      +  base:
                      +    - /srv/pillar
                       #

Resulting in::

    # highstate format, and is generally just key/value pairs.
    pillar_roots:
      base:
        - /srv/pillar
    #
nmadhok added a commit that referenced this pull request Aug 6, 2015
Fixed pillar_roots generation for salt-master.
@nmadhok nmadhok merged commit 0346497 into master Aug 6, 2015
@nmadhok nmadhok deleted the fix_master_pillar_root branch August 6, 2015 09:43
@jpic
Copy link
Member Author

jpic commented Aug 6, 2015

Awesome, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants