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

prereq checker causes an exception #14020

Closed
ghost opened this issue Jul 7, 2014 · 2 comments
Closed

prereq checker causes an exception #14020

ghost opened this issue Jul 7, 2014 · 2 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P3 Priority 3 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around stale State-Module
Milestone

Comments

@ghost
Copy link

ghost commented Jul 7, 2014

Prereq checker fails in 2014.1.5.

I know that this creates a recursion loop, but running this with 'require' instead of 'prereq' fails with a "Recursive requisite found" error, instead of the exception noted below.

$ cat ./dev/scr/init.sls
scratch:
  file.directory:
    - name: '/scr'
    - user: root
    - group: psgvb
    - mode: 2770
    - prereq:
       - file: '/scr'

Output from running the state:

$ sudo salt '*' state.sls saltenv=dev scr test=True
pdx-cent6-salt.schrodinger.com:
    The minion function caused an exception: Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/salt/minion.py", line 796, in _thread_return
        return_data = func(*args, **kwargs)
      File "/usr/lib/python2.6/site-packages/salt/modules/state.py", line 394, in sls
        ret = st_.state.call_high(high_)
      File "/usr/lib/python2.6/site-packages/salt/state.py", line 1713, in call_high
        ret = self.call_chunks(chunks)
      File "/usr/lib/python2.6/site-packages/salt/state.py", line 1437, in call_chunks
        running = self.call_chunk(low, running, chunks)
      File "/usr/lib/python2.6/site-packages/salt/state.py", line 1639, in call_chunk
        running = self.call_chunk(chunk, running, chunks)
      File "/usr/lib/python2.6/site-packages/salt/state.py", line 1639, in call_chunk
        running = self.call_chunk(chunk, running, chunks)
...
      File "/usr/lib/python2.6/site-packages/salt/state.py", line 1639, in call_chunk
        running = self.call_chunk(chunk, running, chunks)
      File "/usr/lib/python2.6/site-packages/salt/state.py", line 1564, in call_chunk
        status = self.check_requisite(low, running, chunks)
      File "/usr/lib/python2.6/site-packages/salt/state.py", line 1482, in check_requisite
        req = trim_req(req)
      File "/usr/lib/python2.6/site-packages/salt/state.py", line 94, in trim_req
        reqfirst = next(iter(req))
    RuntimeError: maximum recursion depth exceeded while calling a Python object

The show_sls output:

$ sudo salt '*' state.show_sls saltenv=dev scr test=True
pdx-cent6-salt.schrodinger.com:
    ----------
    scratch:
        ----------
        __env__:
            dev
        __sls__:
            scr
        file:
            ----------
            - name:
                /scr
            ----------
            - user:
                root
            ----------
            - group:
                psgvb
            ----------
            - mode:
                2770
            ----------
            - prereq:
                ----------
                - file:
                    /scr
            - directory
            ----------
            - order:
                10000
@basepi
Copy link
Contributor

basepi commented Jul 8, 2014

Thanks, we'll get this fixed.

@basepi basepi added Bug labels Jul 8, 2014
@basepi basepi added this to the Approved milestone Jul 8, 2014
@arroyoc arroyoc added State-Module Core relates to code central or existential to Salt severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P3 Priority 3 and removed Low Severity labels Aug 11, 2015
@stale
Copy link

stale bot commented Dec 18, 2017

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.

@stale stale bot added the stale label Dec 18, 2017
@stale stale bot closed this as completed Dec 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P3 Priority 3 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around stale State-Module
Projects
None yet
Development

No branches or pull requests

2 participants