Skip to content

minion stacktrace on top file yaml syntax error #26574

Closed

Description

@jfindlay

configs

li1105-12 ~ master # cat /srv/salt/top.sls 
base:
  '*'
    - state1

commands

li1105-12 ~ master # salt jmoney-master state.show_top
jmoney-master:
    The minion function caused an exception: Traceback (most recent call last):
      File "/root/salt/salt/minion.py", line 1173, in _thread_return
        return_data = func(*args, **kwargs)
      File "/root/salt/salt/modules/state.py", line 1045, in show_top
        top_ = st_.get_top()
      File "/root/salt/salt/state.py", line 2436, in get_top
        tops = self.get_tops()
      File "/root/salt/salt/state.py", line 2313, in get_tops
        saltenv=saltenv
      File "/root/salt/salt/template.py", line 79, in compile_template
        ret = render(input_data, saltenv, sls, **render_kwargs)
      File "/root/salt/salt/renderers/yaml.py", line 50, in render
        data = load(yaml_data, Loader=get_yaml_loader(argline))
      File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load
        return loader.get_single_data()
      File "/usr/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
        node = self.get_single_node()
      File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
        document = self.compose_document()
      File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 55, in compose_document
        node = self.compose_node(None, None)
      File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
        node = self.compose_mapping_node(anchor)
      File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
        while not self.check_event(MappingEndEvent):
      File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event
        self.current_event = self.state()
      File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 439, in parse_block_mapping_key
        "expected <block end>, but found %r" % token.id, token.start_mark)
    ParserError: while parsing a block mapping
      in "<unicode string>", line 1, column 1:
        base:
        ^
    expected <block end>, but found '<block sequence start>'
      in "<unicode string>", line 3, column 5:
            - state1
            ^

versions

li1105-12 ~ master # salt jmoney-master test.versions_report
jmoney-master:
               Salt: 2015.5.5-9-g5a32664
             Python: 2.7.9 (default, Mar  1 2015, 12:57:24)
             Jinja2: 2.7.3
           M2Crypto: 0.21.1
     msgpack-python: 0.4.2
       msgpack-pure: Not Installed
           pycrypto: 2.6.1
            libnacl: Not Installed
             PyYAML: 3.11
              ioflo: Not Installed
              PyZMQ: 14.4.0
               RAET: Not Installed
                ZMQ: 4.0.5
               Mako: 1.0.0
            Tornado: Not Installed
            timelib: Not Installed
           dateutil: Not Installed

Activity

  1. added
    bug
    severity-medium
    Core
    P4
    on Aug 21, 2015
  2. added this to the Approved milestone on Aug 21, 2015
  3. added a commit that references this issue on May 19, 2016
    a7eb3c3
  4. cachedout commented on May 19, 2016

    @cachedout
    Contributor

    Fixed by #33375

  5. added a commit that references this issue on May 19, 2016
    2b5ad12
  6. added a commit that references this issue on May 20, 2016
    336fbb0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreP4bugseverity-medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions