FAQ
Hello,

I'd like to use the docker support of salt, but it requires docker-py from
either pip or apt.
The problem is that when the state runs is will install docker-py but my
docker.pulled state will fail as docker-py was not there yet.
How to solve this issue?

thanx

--
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

  • Alex Leonhardt at Nov 26, 2014 at 8:20 am
    Can you put a require on the docker.pull to ensure that the package is
    installed first, before trying to pull a image?

    Alex
    On Wed, 26 Nov 2014 08:16 Sebastien Estienne wrote:

    Hello,

    I'd like to use the docker support of salt, but it requires docker-py from
    either pip or apt.
    The problem is that when the state runs is will install docker-py but my
    docker.pulled state will fail as docker-py was not there yet.
    How to solve this issue?

    thanx

    --
    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.
  • Sebastien Estienne at Nov 26, 2014 at 5:48 pm
    I have a required on docker in my pull, but i think the issue is related to
    "python" or the way the salt's modules are loaded.

    here is part of my formula to deploy docker:
    https://gist.github.com/sebest/2791b1ba6cba2d5c37b1

    Le mercredi 26 novembre 2014 00:21:31 UTC-8, Alex Leonhardt a écrit :
    Can you put a require on the docker.pull to ensure that the package is
    installed first, before trying to pull a image?

    Alex

    On Wed, 26 Nov 2014 08:16 Sebastien Estienne <sebastien...@gmail.com
    <javascript:>> wrote:
    Hello,

    I'd like to use the docker support of salt, but it requires docker-py
    from either pip or apt.
    The problem is that when the state runs is will install docker-py but my
    docker.pulled state will fail as docker-py was not there yet.
    How to solve this issue?

    thanx

    --
    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+...@googlegroups.com <javascript:>.
    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.
  • Colton Myers at Dec 4, 2014 at 10:50 pm
    Ah, I see the problem. The `pip.installed` state doesn't automatically trigger a module refresh like the `pkg` states do.

    The fix should be as easy as adding `reload_modules: True` to your pip state:

    docker-py:
       pip.installed:
         - require:
           - pkg: python-pip
           - reload_modules: True

    Keep me posted if that doesn't solve your problem.

    --
    Colton Myers
    Platform Engineer, SaltStack
    @basepi on Github/Twitter/IRC
    On Nov 26, 2014, at 10:48 AM, Sebastien Estienne wrote:

    I have a required on docker in my pull, but i think the issue is related to "python" or the way the salt's modules are loaded.

    here is part of my formula to deploy docker:
    https://gist.github.com/sebest/2791b1ba6cba2d5c37b1

    Le mercredi 26 novembre 2014 00:21:31 UTC-8, Alex Leonhardt a écrit :
    Can you put a require on the docker.pull to ensure that the package is installed first, before trying to pull a image?

    Alex

    On Wed, 26 Nov 2014 08:16 Sebastien Estienne <sebastien...@gmail.com <javascript:>> wrote:
    Hello,

    I'd like to use the docker support of salt, but it requires docker-py from either pip or apt.
    The problem is that when the state runs is will install docker-py but my docker.pulled state will fail as docker-py was not there yet.
    How to solve this issue?

    thanx

    --
    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+...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout <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 <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.
  • Sebastien Estienne at Dec 5, 2014 at 10:49 am
    Yes thanx, that's what i needed.
    i think that in your example 'reload_modules' should be at the same level
    than 'require', not as a sublevel.

    do you think that pip.installed should trigger the reload module
    automatically as salt is written in python as its dependencies?!

    Le jeudi 4 décembre 2014 14:50:16 UTC-8, basepi a écrit :
    Ah, I see the problem. The `pip.installed` state doesn't automatically
    trigger a module refresh like the `pkg` states do.

    The fix should be as easy as adding `reload_modules: True` to your pip
    state:

    docker-py:
    pip.installed:
    - require:
    - pkg: python-pip
    - reload_modules: True

    Keep me posted if that doesn't solve your problem.

    --
    Colton Myers
    Platform Engineer, SaltStack
    @basepi on Github/Twitter/IRC

    On Nov 26, 2014, at 10:48 AM, Sebastien Estienne <sebastien...@gmail.com
    <javascript:>> wrote:

    I have a required on docker in my pull, but i think the issue is related
    to "python" or the way the salt's modules are loaded.

    here is part of my formula to deploy docker:
    https://gist.github.com/sebest/2791b1ba6cba2d5c37b1

    Le mercredi 26 novembre 2014 00:21:31 UTC-8, Alex Leonhardt a écrit :
    Can you put a require on the docker.pull to ensure that the package is
    installed first, before trying to pull a image?

    Alex

    On Wed, 26 Nov 2014 08:16 Sebastien Estienne <sebastien...@gmail.com>
    wrote:
    Hello,

    I'd like to use the docker support of salt, but it requires docker-py
    from either pip or apt.
    The problem is that when the state runs is will install docker-py but my
    docker.pulled state will fail as docker-py was not there yet.
    How to solve this issue?

    thanx

    --
    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+...@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+...@googlegroups.com <javascript:>.
    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.
  • Colton Myers at Dec 9, 2014 at 10:13 pm
    Yep, you're totally right, I typo'd that. Put `reload_modules` at the same level as the require.

    It probably should. I think there might be an open issue but I can't find it right at the moment.

    --
    Colton Myers
    Platform Engineer, SaltStack
    @basepi on Github/Twitter/IRC
    On Dec 5, 2014, at 3:49 AM, Sebastien Estienne wrote:

    Yes thanx, that's what i needed.
    i think that in your example 'reload_modules' should be at the same level than 'require', not as a sublevel.

    do you think that pip.installed should trigger the reload module automatically as salt is written in python as its dependencies?!

    Le jeudi 4 décembre 2014 14:50:16 UTC-8, basepi a écrit :
    Ah, I see the problem. The `pip.installed` state doesn't automatically trigger a module refresh like the `pkg` states do.

    The fix should be as easy as adding `reload_modules: True` to your pip state:

    docker-py:
    pip.installed:
    - require:
    - pkg: python-pip
    - reload_modules: True

    Keep me posted if that doesn't solve your problem.

    --
    Colton Myers
    Platform Engineer, SaltStack
    @basepi on Github/Twitter/IRC
    On Nov 26, 2014, at 10:48 AM, Sebastien Estienne <sebastien...@ <>gmail.com <http://gmail.com/>> wrote:

    I have a required on docker in my pull, but i think the issue is related to "python" or the way the salt's modules are loaded.

    here is part of my formula to deploy docker:
    https://gist.github.com/sebest/2791b1ba6cba2d5c37b1 <https://gist.github.com/sebest/2791b1ba6cba2d5c37b1>

    Le mercredi 26 novembre 2014 00:21:31 UTC-8, Alex Leonhardt a écrit :
    Can you put a require on the docker.pull to ensure that the package is installed first, before trying to pull a image?

    Alex

    On Wed, 26 Nov 2014 08:16 Sebastien Estienne <sebastien...@gmail.com <>> wrote:
    Hello,

    I'd like to use the docker support of salt, but it requires docker-py from either pip or apt.
    The problem is that when the state runs is will install docker-py but my docker.pulled state will fail as docker-py was not there yet.
    How to solve this issue?

    thanx

    --
    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+...@ <>googlegroups. <http://googlegroups.com/>com <http://googlegroups.com/>.
    For more options, visit https://groups.google.com/d/optout <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+...@googlegroups.com <>.
    For more options, visit https://groups.google.com/d/optout <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 <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 @
postedNov 26, '14 at 8:16a
activeDec 9, '14 at 10:13p
posts6
users3

People

Translate

site design / logo © 2022 Grokbase