Discussion:
[salt-users] need help using gifts /ext_pillar with git backends and non-master branches
Clive Saha
2014-12-23 21:22:43 UTC
Permalink
Hi, I'm unable to get data from a git repo when using a non-master branch.
I've tried with both gitpython and pygit2 (0.21- compiled locally with
compatible libgit2) backends. I'm running salt 2014.7.0 on Redhat 6.5. If
someone has gotten this config working, i'd be very interested to learn how.

Here's my relevant salt-master config. I'm trying to use a branch called
"staging"
-----------
gitfs_base: staging
gitfs_remotes:
- http://10.0.0.1/salt-repo/salt.git

gitfs_root: state/

ext_pillar:
- git: staging http://10.0.0.1/salt-repo/salt.git root=pillar/

-----------------

I've verified the branch is accessible on the host via http. The pillar
top.sls file has a BASE environment:

base:
'*':
# PLEASE KEEP THESE IN ALPHABETICAL ORDER! -thnx.
- apache
- ...

When i run salt-call state.highstate -l info test=True, on the server i see
this:

[ERROR ] Specified SLS 'apache' in environment 'base' is not available on
the salt master

and then:

[CRITICAL] Pillar render error: Specified SLS 'apache' in environment
'base' is not available on the salt master

But what's weird is the server debug logs show this as well:
-------------------------------------------
[INFO ] AES payload received with command _pillar
[DEBUG ] Updating fileserver for git_pillar module
[DEBUG ] Jinja search path:
['/var/cache/salt/master/pillar_gitfs/dd16046894c244d06912d53591c3b08c/pillar']
[DEBUG ] Rendered data from file:
/var/cache/salt/master/pillar_gitfs/dd16046894c244d06912d53591c3b08c/pillar/top.sls:
base:
'*':
# PLEASE KEEP THESE IN ALPHABETICAL ORDER! -thnx.
- apache
---------------------------------------------------
So it seems like it's getting this cached pillar which has a "base"
environment but it complains it can't find it ? The files are all in the
right places in the git branch. Everything works of course if i just switch
staging to master.

Thank you for reading this far. :)

The larger problem we're trying to solve is how to develop with Salt - We
want a staging branch - the idea is that people fork off this, work on
features/states and merge back into staging and use it for integration.
Then once regression tests etc. have been run on the staging branch, we
want to merge into master.

So for us, staging looks exactly like master - maybe a couple of commits
behind. We want salt masters that just point at staging which is what i'm
trying to achieve.

Has anyone successfully made this work ?

Thanks
clive
--
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.
Mike Flood
2014-12-24 00:38:59 UTC
Permalink
Hi Clive,

This sounds like https://github.com/saltstack/salt/issues/11575

cheers,

-----------
Post by Clive Saha
gitfs_base: staging
- http://10.0.0.1/salt-repo/salt.git
gitfs_root: state/
- git: staging http://10.0.0.1/salt-repo/salt.git root=pillar/
-----------------
I've verified the branch is accessible on the host via http. The pillar
# PLEASE KEEP THESE IN ALPHABETICAL ORDER! -thnx.
- apache
- ...
When i run salt-call state.highstate -l info test=True, on the server i
[ERROR ] Specified SLS 'apache' in environment 'base' is not available
on the salt master
[CRITICAL] Pillar render error: Specified SLS 'apache' in environment
'base' is not available on the salt master
-------------------------------------------
[INFO ] AES payload received with command _pillar
[DEBUG ] Updating fileserver for git_pillar module
['/var/cache/salt/master/pillar_gitfs/dd16046894c244d06912d53591c3b08c/pillar']
# PLEASE KEEP THESE IN ALPHABETICAL ORDER! -thnx.
- apache
---------------------------------------------------
So it seems like it's getting this cached pillar which has a "base"
environment but it complains it can't find it ? The files are all in the
right places in the git branch. Everything works of course if i just switch
staging to master.
Thank you for reading this far. :)
The larger problem we're trying to solve is how to develop with Salt - We
want a staging branch - the idea is that people fork off this, work on
features/states and merge back into staging and use it for integration.
Then once regression tests etc. have been run on the staging branch, we
want to merge into master.
So for us, staging looks exactly like master - maybe a couple of commits
behind. We want salt masters that just point at staging which is what i'm
trying to achieve.
Has anyone successfully made this work ?
Thanks
clive
--
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.
Loading...