pe_r10k: Unable to determine current branches

1,601 views
Skip to first unread message

dcroonen

unread,
Dec 3, 2015, 7:50:43 AM12/3/15
to Puppet Users
Hi all

Just installed a fresh pe master. While running pe_r10k for the second time I got the following error: 

r10k deploy environment -p -v debug2
[2015-12-03 13:41:10 - DEBUG1] Testing to see if feature pe_license is available.
[2015-12-03 13:41:10 - DEBUG2] Attempting to load library 'pe_license' for feature pe_license
[2015-12-03 13:41:10 - DEBUG1] Feature pe_license is available.
[2015-12-03 13:41:10 - DEBUG2] pe_license feature is available, loading PE license key
[2015-12-03 13:41:10 - DEBUG1] Testing to see if feature rugged is available.
[2015-12-03 13:41:10 - DEBUG2] Attempting to load library 'rugged' for feature rugged
[2015-12-03 13:41:10 - DEBUG1] Feature rugged is available.
[2015-12-03 13:41:10 - DEBUG] Fetching 'git://<server>:7990/scm/ns/puppet.git' to determine current branches.
[2015-12-03 13:41:10 - DEBUG1] Fetching remote 'origin' at /var/cache/r10k/git---<server>-7990-scm-ns-puppet.git
[2015-12-03 13:41:30 - ERROR] Unable to determine current branches for Git source 'mymodules' (/etc/puppetlabs/puppet/environments)
Original exception:
Early EOF at /var/cache/r10k/git---<server>-7990-scm-ns-puppet.git

The strange thing is while I ran r10k for the first time everything went pretty well.

Any ideas on how to fix this?

Greetings
Davy

dcroonen

unread,
Dec 3, 2015, 8:11:20 AM12/3/15
to Puppet Users
Found why the first run succeeded, because I used our old username/password method for cloning the git. It went wrong from the moment I tried to use ssh keys.
Some additional info (r10k.yaml):

---
cachedir: /var/cache/r10k
sources:
  mymodules:
    basedir: /etc/puppetlabs/puppet/environments
    remote: git://<server>:7990/scm/ns/puppet.git

git:
    private_key: /home/puppetmaster/.ssh/id_rsa
    provider: rugged
    username: puppetmaster

Any help would be greatly appreciated.


Op donderdag 3 december 2015 13:50:43 UTC+1 schreef dcroonen:

Vadym Chepkov

unread,
Dec 13, 2015, 7:21:34 AM12/13/15
to Puppet Users
You didn't specify, what version you use, so I assume one of PE2015 versions.
This version moved location where it expects environments to be, so you need to either adjust your hiera or modify settings in console for class pe_r10k

This is how my r10k.yaml looks for Windows supporting master:

# cat /etc/puppetlabs/r10k/r10k.yaml
---
cachedir: /var/cache/r10k
sources:
  linux:
    basedir: /etc/puppetlabs/code/linux
    invalid_branches: correct
  windows:
    basedir: /etc/puppetlabs/code/environments
    invalid_branches: correct

git:
    private_key: /root/.ssh/id_rsa
    provider: rugged


Reply all
Reply to author
Forward
0 new messages