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

Backport #30844 to 2015.8 branch #30847

Merged
merged 4 commits into from Feb 3, 2016
Merged

Commits on Feb 3, 2016

  1. Fix for gitfs ext_pillar on standalone minion

    When configured to use a gitpython-based ext_pillar, salt-call --local (I don't have a master) was giving the error:
      Failed to checkout <branch> from git_pillar remote '<repo location>': remote ref does not exist
    regardless of whether the branch existed or not. Poking around in the cache directory, I found that the cloned repository had a remote named 'origin' set, but no fetch had ever been done, so 'git checkout' would always fail. It doesn't know about any branches yet.
    
    Adding the fetch here, immediately after creating the remote, resolves the problem.
    
    I'm not totally sure this is the _correct_ fix as I'm not familiar with this code, and this code is used in many situations, not just minced. But I believe it to be harmless in the worst case, a redundant fetch.
    Kris Raney authored and terminalmage committed Feb 3, 2016
    Copy the full SHA
    78f92e9 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    53c4b4a View commit details
    Browse the repository at this point in the history
  3. Only perform initial fetch when running on a minion

    This prevents the master's maintenance process from attempting to run a
    fetch while GitBase.init_remotes() is in the process fetching a
    newly-added remote.
    
    We have proper locking in place, so there is no danger of a race
    condition, but this does suppress the warning generated when an update
    lock is in place at the time a fetch is attempted.
    terminalmage committed Feb 3, 2016
    Copy the full SHA
    17dfec2 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    58c4c01 View commit details
    Browse the repository at this point in the history