salt: Rendering SLS 'base:XXXXX' failed: found unexpected ':'

Description of Issue/Question

When running “salt-call state.apply” and having a grains file “:” sign within grains options it fails with this message

[CRITICAL] Rendering SLS 'base:atlassian/jira' failed: found unexpected ':'
local:
    Data failed to compile:
----------
    Rendering SLS 'base:atlassian/jira' failed: found unexpected ':'

The grains file looks like this:

jira_java_opts:
- Dcom.sun.management.jmxremote
- Dcom.sun.management.jmxremote.port=9010
- Dcom.sun.management.jmxremote.rmi.port=9010
- Dcom.sun.management.jmxremote.local.only=true
- Dcom.sun.management.jmxremote.ssl=false
- Dcom.sun.management.jmxremote.authenticate=false
- Duser.timezone=Europe/Stockholm
- XX:+PrintGCDetails
- XX:+PrintGCDateStamps
- XX:+PrintGCTimeStamps
- XX:+PrintGCCause
- Xloggc:/var/atlassian/application-data/jira/log/atlassian-jira-gc-%t.log
- XX:+UseGCLogFileRotation
- XX:NumberOfGCLogFiles=5
- XX:GCLogFileSize=20M
- XX:ReservedCodeCacheSize=384m
- XX:+UseG1GC
- Datlassian.mail.senddisabled=true
- Datlassian.mail.fetchdisabled=true
- Datlassian.mail.popdisabled=true
jira_version: 8.1.0
jira_xms: 3g
jira_xmx: 3g
roles: jira

If I remove the : sign from all the options above it works ok OR if I downgrade to version 2015.8.8+ds-1 it also works ok (im now running 2019.2.0+ds-1)

What todo ?

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 16 (12 by maintainers)

Commits related to this issue

Most upvoted comments

In my case this worked fine before the upgrade, and now it is no longer working. Additionally, I’m using a saltstack provided formula, only providing the pillar data, so I don’t have control over the state to use the json filter.

Is it really the case that this type of list usage is no longer allowed in context?

@mrichar1 SaltStack development team doesn’t maintain salt formulas. If you’d like you can create a new issue in the specific formula repository. Also we will be allowing a user to revert to the old behavior in 2019.2.1 release as documented here: https://docs.saltstack.com/en/latest/topics/releases/2019.2.1.html#change-to-yaml-renderer

Reading @mrichar1 comment, I see we have in common to use Salt without using salt-master (I’m using salt-ssh). This may be the key to reproduce this bug.

Wow, easy fixed as it turned out … It worked like a charm running it trough json as suggested 😃

Many thanks

I’m hitting the same problem trying to use the saltstack ntp-formula after an upgrade to 2019.2.0 (was working fine before that).

In my case the issue occurs when using a pillar who’s value is a list, where the list item contains a ::

ntp_conf:
  restrict: ['127.0.0.1', '::1']

I’ve mansed to reduce the problem down to this example config which seems to trigger it:

state:

test:
  file.managed:
    - name: /tmp/test
    - context:
      config: {{ pillar.get('test') }}

pillar:

test:
  - "abc:def"

Data failed to compile:

Rendering SLS ‘base:profile’ failed: found unexpected ‘:’

If the pillar data is changed to a simple string (test: "abc:def") the error doesn’t occur.

(I’m running masterless if that is at all relevant).