FAQ
Hiya

I want to override a built-in state module and followed the guide at
http://docs.saltstack.com/en/latest/ref/states/writing.html#using-custom-state-modules.
Unfortunately, this sentence seems ambigious:

"Place your custom state modules inside a _states directory within the
file_roots specified by the master config file."

I'm guessing that the intended meaning is something like "... inside a
_states directory within a file_roots directory for the environment for
which the module should be loaded...". I tried this, but it doesn't work.
The minion debug log says (note: this is a masterless Windows minion):

[INFO ] Creating module dir
'c:\\salt\\var\\cache\\salt\\minion\\extmods\\states'
[INFO ] Syncing states for environment 'flagspeed'
[INFO ] Loading cache from salt://_states, for flagspeed)
[INFO ] Caching directory '_states/' for environment 'flagspeed'
[DEBUG ] Local cache dir:
'c:\\salt\\var\\cache\\salt\\minion\\files\\flagspeed\\_states'

However, after running state.highstate on the minion, the first cache
folder mentioned is empty and the second one doesn't exist. The module
(obviously) isn't overridden. What's going on? Any help or pointers
appreciated :).

Best Regards
Christian

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Stephen Spencer at Sep 9, 2014 at 1:45 pm
    saltutils.sync_modules is the more concise route. That being said, I have
    also noticed some inconsistencies with custom module and grain
    synchronization. I just haven't figured out a describable pattern of
    failure for opening an issue yet.

    -S
    On Sep 9, 2014 7:44 AM, "Zero3" wrote:

    Hiya

    I want to override a built-in state module and followed the guide at
    http://docs.saltstack.com/en/latest/ref/states/writing.html#using-custom-state-modules.
    Unfortunately, this sentence seems ambigious:

    "Place your custom state modules inside a _states directory within the
    file_roots specified by the master config file."

    I'm guessing that the intended meaning is something like "... inside a
    _states directory within a file_roots directory for the environment for
    which the module should be loaded...". I tried this, but it doesn't work.
    The minion debug log says (note: this is a masterless Windows minion):

    [INFO ] Creating module dir
    'c:\\salt\\var\\cache\\salt\\minion\\extmods\\states'
    [INFO ] Syncing states for environment 'flagspeed'
    [INFO ] Loading cache from salt://_states, for flagspeed)
    [INFO ] Caching directory '_states/' for environment 'flagspeed'
    [DEBUG ] Local cache dir:
    'c:\\salt\\var\\cache\\salt\\minion\\files\\flagspeed\\_states'

    However, after running state.highstate on the minion, the first cache
    folder mentioned is empty and the second one doesn't exist. The module
    (obviously) isn't overridden. What's going on? Any help or pointers
    appreciated :).

    Best Regards
    Christian

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Christian Funder Sommerlund at Sep 9, 2014 at 3:46 pm
    I found the following bug report which I added my info to:
    https://github.com/saltstack/salt/issues/14048

    - Christian

    2014-09-09 15:45 GMT+02:00 Stephen Spencer <gladiatr72@gmail.com>:
    saltutils.sync_modules is the more concise route. That being said, I have
    also noticed some inconsistencies with custom module and grain
    synchronization. I just haven't figured out a describable pattern of
    failure for opening an issue yet.

    -S
    On Sep 9, 2014 7:44 AM, "Zero3" wrote:

    Hiya

    I want to override a built-in state module and followed the guide at
    http://docs.saltstack.com/en/latest/ref/states/writing.html#using-custom-state-modules.
    Unfortunately, this sentence seems ambigious:

    "Place your custom state modules inside a _states directory within the
    file_roots specified by the master config file."

    I'm guessing that the intended meaning is something like "... inside a
    _states directory within a file_roots directory for the environment for
    which the module should be loaded...". I tried this, but it doesn't work.
    The minion debug log says (note: this is a masterless Windows minion):

    [INFO ] Creating module dir
    'c:\\salt\\var\\cache\\salt\\minion\\extmods\\states'
    [INFO ] Syncing states for environment 'flagspeed'
    [INFO ] Loading cache from salt://_states, for flagspeed)
    [INFO ] Caching directory '_states/' for environment 'flagspeed'
    [DEBUG ] Local cache dir:
    'c:\\salt\\var\\cache\\salt\\minion\\files\\flagspeed\\_states'

    However, after running state.highstate on the minion, the first cache
    folder mentioned is empty and the second one doesn't exist. The module
    (obviously) isn't overridden. What's going on? Any help or pointers
    appreciated :).

    Best Regards
    Christian

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to a topic in the
    Google Groups "Salt-users" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/salt-users/jRzWqbLbWOA/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to
    salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedSep 9, '14 at 12:44p
activeSep 9, '14 at 3:46p
posts3
users2

People

Translate

site design / logo © 2022 Grokbase