saltstack-formulas / php-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
57 stars 231 forks source link

Issue when running highstate #16

Closed TaiSHiNet closed 10 years ago

TaiSHiNet commented 10 years ago

I tried my own pillar and the default pillar.example, minion is running latest dev. Tried playing with the code a bit, but really have no idea where is it imploding.

[INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache 'salt://php/ng/fpm/pools_config.sls'
[DEBUG   ] Jinja search path: ['/var/cache/salt/minion/files/base']
[DEBUG   ] Decrypting the current master AES key
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache 'salt://php/ng/map.jinja'
[INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache 'salt://php/ng/macro.jinja'
[DEBUG   ] Rendered data from file: /var/cache/salt/minion/files/base/php/ng/fpm/pools_config.sls:
# Manages the php-fpm pools config files

# Simple path concatenation.

[DEBUG   ] Results of YAML rendering: 
{}
Passed invalid arguments: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 91, in call
    ret['return'] = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/modules/state.py", line 287, in highstate
    whitelist=kwargs.get('whitelist')
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2768, in call_highstate
    return self.state.call_high(high)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1886, in call_high
    high, ext_errors = self.reconcile_extend(high)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1156, in reconcile_extend
    .extend(arg[argfirst]))
TypeError: 'NoneType' object is not iterable
TaiSHiNet commented 10 years ago

Something wrong locally.

rskuipers commented 9 years ago

@TaiSHiNet Do you remember what was wrong? I'm getting this same error on php.ng.fpm.

rskuipers commented 9 years ago

@TaiSHiNet Never mind, I forgot to define my pillars in pillars/top.sls >.<

alrayyes commented 8 years ago

I'm getting the same error. My pillar looks like this:

php:
  ng:
    version: 7.0

Get the following Traceback:

[INFO    ] Fetching file from saltenv 'base', ** done ** 'php/ng/macro.jinja'
[PROFILE ] Time (in seconds) to render '/var/cache/salt/minion/files/base/php/ng/fpm/pools_config.sls' using 'jinja' renderer: 0.442603826523
[DEBUG   ] Rendered data from file: /var/cache/salt/minion/files/base/php/ng/fpm/pools_config.sls:
# Manages the php-fpm pools config files

# Simple path concatenation.

[DEBUG   ] Results of YAML rendering:
{}
[PROFILE ] Time (in seconds) to render '/var/cache/salt/minion/files/base/php/ng/fpm/pools_config.sls' using 'yaml' renderer: 0.000737905502319
[WARNING ] Passed invalid arguments to state.apply: 'NoneType' object is not iterable

    .. versionadded:: 2015.5.0

    This function will call :mod:`state.highstate
    <salt.modules.state.highstate>` or :mod:`state.sls
    <salt.modules.state.sls>` based on the arguments passed to this function.
    It exists as a more intuitive way of applying states.

    .. rubric:: APPLYING ALL STATES CONFIGURED IN TOP.SLS (A.K.A. :ref:`HIGHSTATE <running-highstate>`)

    To apply all configured states, simply run ``state.apply``:

    .. code-block:: bash

        salt '*' state.apply

    The following additional arguments are also accepted when applying all
    states configured in top.sls:

    test
        Run states in test-only (dry-run) mode

    pillar
        Custom Pillar values, passed as a dictionary of key-value pairs

        .. code-block:: bash

            salt '*' state.apply test pillar='{"foo": "bar"}'

        .. note::
            Values passed this way will override Pillar values set via
            ``pillar_roots`` or an external Pillar source.

    queue : False
        Instead of failing immediately when another state run is in progress,
        queue the new state run to begin running once the other has finished.

        This option starts a new thread for each queued state run, so use this
        option sparingly.

    localconfig
        Optionally, instead of using the minion config, load minion opts from
        the file specified by this argument, and then merge them with the
        options from the minion config. This functionality allows for specific
        states to be run with their own custom minion configuration, including
        different pillars, file_roots, etc.

        .. code-block:: bash

            salt '*' state.apply localconfig=/path/to/minion.yml

    .. rubric:: APPLYING INDIVIDUAL SLS FILES (A.K.A. :py:func:`STATE.SLS <salt.modules.state.sls>`)

    To apply individual SLS files, pass them as a comma-separated list:

    .. code-block:: bash

        # Run the states configured in salt://test.sls (or salt://test/init.sls)
        salt '*' state.apply test
        # Run the states configured in salt://test.sls (or salt://test/init.sls)
        # and salt://pkgs.sls (or salt://pkgs/init.sls).
        salt '*' state.apply test,pkgs

    The following additional arguments are also accepted when applying
    individual SLS files:

    test
        Run states in test-only (dry-run) mode

    pillar
        Custom Pillar values, passed as a dictionary of key-value pairs

        .. code-block:: bash

            salt '*' state.apply test pillar='{"foo": "bar"}'

        .. note::
            Values passed this way will override Pillar values set via
            ``pillar_roots`` or an external Pillar source.

    queue : False
        Instead of failing immediately when another state run is in progress,
        queue the new state run to begin running once the other has finished.

        This option starts a new thread for each queued state run, so use this
        option sparingly.

    concurrent : False
        Execute state runs concurrently instead of serially

        .. warning::

            This flag is potentially dangerous. It is designed for use when
            multiple state runs can safely be run at the same time. Do *not*
            use this flag for performance optimization.

    saltenv : None
        Specify a salt fileserver environment to be used when applying states

        .. versionchanged:: 0.17.0
            Argument name changed from ``env`` to ``saltenv``

        .. versionchanged:: 2014.7.0
            If no saltenv is specified, the minion config will be checked for a
            ``saltenv`` parameter and if found, it will be used. If none is
            found, ``base`` will be used. In prior releases, the minion config
            was not checked and ``base`` would always be assumed when the
            saltenv was not explicitly set.

    pillarenv
        Specify a Pillar environment to be used when applying states. By
        default, all Pillar environments will be merged together and used.

    localconfig
        Optionally, instead of using the minion config, load minion opts from
        the file specified by this argument, and then merge them with the
        options from the minion config. This functionality allows for specific
        states to be run with their own custom minion configuration, including
        different pillars, file_roots, etc.

        .. code-block:: bash

            salt '*' state.apply test localconfig=/path/to/minion.yml

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 1318, in _thread_return
    return_data = executor.execute()
  File "/usr/lib/python2.7/dist-packages/salt/executors/direct_call.py", line 28, in execute
    return self.func(*self.args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/modules/state.py", line 455, in apply_
    return sls(mods, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/modules/state.py", line 942, in sls
    ret = st_.state.call_high(high_)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2218, in call_high
    high, ext_errors = self.reconcile_extend(high)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1364, in reconcile_extend
    high[name][state][hind][argfirst].extend(arg[argfirst])
TypeError: 'NoneType' object is not iterable

Running in Debian Jessie. Is there something I'm missing?

@TaiSHiNet @rskuipers What did you change to get this working?

alrayyes commented 8 years ago

Never mind, Found the solution in #47, specifically this comment