Project

General

Profile

Bug #3125

After installing foreman with foreman-installer and git, error in reports

Added by Benjamin Papillon about 7 years ago. Updated over 2 years ago.

Status:
Rejected
Priority:
Normal
Category:
Foreman modules
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Foreman 1.3 RC1 - I installed foreman with foreman-installer and mostly default options

The git option was enabled to check. After the installation is completed, On the Web Interface I can see the following failing puppet report :


err     /File[/var/lib/puppet/lib]     Could not evaluate: Could not retrieve information from environment production source(s) puppet://testpuppet.claer.hammock.fr/plugins
err     Puppet     Could not retrieve catalog from remote server: Error 400 on SERVER: Unable to set config_version: Execution of 'git --git-dir /etc/puppet/environments/production/.git describe --all --long' returned 128: fatal: Not a git repository: '/etc/puppet/environments/production/.git' on node testpuppet.claer.hammock.fr
notice     Puppet     Using cached catalog
err     Puppet     Could not retrieve catalog; skipping run

I did not investigate more for the moment

History

#1 Updated by Dominic Cleal about 7 years ago

  • Project changed from Foreman to Installer
  • Category set to Foreman modules
  • Target version set to 1.3.0

The $config_version_cmd is incorrect in puppet/manifests/server.pp, it should point the config command to /var/lib/puppet/puppet.git rather than the output directory in the modulepath.

Regression.

#2 Updated by Greg Sutcliffe about 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Greg Sutcliffe

Actually the path is fine within /etc, it just needs /modules appending since thats where the git clone of /var starts from. Will fix.

#3 Updated by Greg Sutcliffe about 7 years ago

  • Status changed from Assigned to Rejected

I can replicate this, but it's not a bug :P

The path is correct - what's happening is that immediately after the installer finishes, the path `/etc/puppet/environments/production/` doesn't exist. This is because you haven't pushed any code to the production branch of the new repo yet. Once you push some code, the error goes away:

$ puppet agent -tv
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Execution of config_version command `git --git-dir /etc/puppet/environments/production/.git describe --all --long` failed: Execution of 'git --git-dir /etc/puppet/environments/production/.git describe --all --long' returned 128: fatal: Not a git repository: '/etc/puppet/environments/production/.git' on node gittest.elysium.emeraldreverie.org
$ clone /var/lib/puppet/puppet.git puppetmodules
$ cd puppetmodules/ && mkdir modules
$ cp -r /usr/share/foreman-installer/modules/puppet modules/
$ git add -A
$ git commit -m "initial"
$ git push origin HEAD:production
$ puppet agent -tv
Info: Retrieving plugin
Info: Caching catalog for gittest.elysium.emeraldreverie.org
Info: Applying configuration version 'heads/production-0-gd1b8cf6'
Notice: Finished catalog run in 0.14 seconds

I'm going to close this, and open a docs bug to actually write up the git-repo option, and get this documented.

#4 Updated by Greg Sutcliffe about 7 years ago

See #3132

Also available in: Atom PDF